Advertisement
Guest User

Untitled

a guest
Nov 30th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. ---
  2. - hosts: localhost
  3. become: yes
  4.  
  5. tasks:
  6. - hostname: name=host
  7.  
  8. - lineinfile: dest=/etc/hosts line="{{ansible_default_ipv4.address}} {{ansible_fqdn}} {{ansible_hostname}}"
  9.  
  10. - name: install epel release
  11. yum: name=epel-release
  12.  
  13. - name: foreman repos centos7 install
  14. yum: name=http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm state=present
  15.  
  16. - name: foreman 1.13 repos release centos7 install
  17. yum: name=http://yum.theforeman.org/releases/1.13/el7/x86_64/foreman-release.rpm state=present
  18.  
  19. ###### Packages ########
  20. - name: Puppet DB Package
  21. yum: name=puppetdb
  22.  
  23. - name: Puppet DB Terminus Package
  24. yum: name=puppetdb-terminus
  25.  
  26. - name: foreman installer
  27. yum: name=foreman-installer
  28.  
  29. ###### Puppet DB stuff #######
  30.  
  31. - name: Replace Java Params in Puppetdb
  32. replace: dest=/etc/sysconfig/puppetdb regexp='-Xmx192m' replace='-Xmx1024m'
  33.  
  34. - name: Prepare jetty Puppetdb
  35. lineinfile: dest=/etc/puppetdb/conf.d/jetty.ini insertbefore='^# host = <host>' line="localhost"
  36.  
  37. - name: Prepare jetty Puppetdb 2
  38. lineinfile: dest=/etc/puppetdb/conf.d/jetty.ini insertafter='^# host = <host>' line="host = 0.0.0.0"
  39.  
  40. - name: Adding puppetdb.conf to Puppet
  41. template: src=puppetdb.conf dest=/etc/puppet/puppetdb.conf owner=puppet group=puppet mode=0644
  42.  
  43. - name: Adding routes.yaml to Puppet
  44. template: src=routes.yaml dest=/etc/puppet/routes.yaml owner=puppet group=puppet mode=0644
  45.  
  46. - name: run foreman installer
  47. command: foreman-installer --enable-foreman --enable-foreman-cli --enable-foreman-compute-vmware --enable-foreman-plugin-ansible --enable-foreman-plugin-cockpit --enable-foreman-plugin-default-hostgroup --enable-foreman-plugin-discovery --enable-foreman-plugin-docker --enable-foreman-plugin-expire-hosts --enable-foreman-plugin-hooks --enable-foreman-plugin-host-extra-validator --enable-foreman-plugin-memcache --enable-foreman-plugin-openscap --enable-foreman-plugin-dhcp-browser --enable-foreman-plugin-puppetdb --enable-foreman-plugin-remote-execution --enable-foreman-plugin-setup --enable-foreman-plugin-tasks --enable-foreman-proxy --enable-foreman-proxy-plugin-discovery --enable-foreman-proxy-plugin-dns-powerdns --enable-foreman-proxy-plugin-dynflow --enable-foreman-proxy-plugin-openscap --enable-foreman-proxy-plugin-remote-execution-ssh --enable-puppet --foreman-admin-email=mail@mail.ru --foreman-admin-first-name=Administrator --foreman-admin-last-name=Admin --foreman-admin-password=SetupForeman! --foreman-admin-username=adminmy --puppet-hiera-config=/etc/puppet/hiera.yaml --puppet-ssldir=/var/lib/puppet/ssl --puppet-vardir=/var/lib/puppet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement