Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: localhost
- become: yes
- tasks:
- - hostname: name=host
- - lineinfile: dest=/etc/hosts line="{{ansible_default_ipv4.address}} {{ansible_fqdn}} {{ansible_hostname}}"
- - name: install epel release
- yum: name=epel-release
- - name: foreman repos centos7 install
- yum: name=http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm state=present
- - name: foreman 1.13 repos release centos7 install
- yum: name=http://yum.theforeman.org/releases/1.13/el7/x86_64/foreman-release.rpm state=present
- ###### Packages ########
- - name: Puppet DB Package
- yum: name=puppetdb
- - name: Puppet DB Terminus Package
- yum: name=puppetdb-terminus
- - name: foreman installer
- yum: name=foreman-installer
- ###### Puppet DB stuff #######
- - name: Replace Java Params in Puppetdb
- replace: dest=/etc/sysconfig/puppetdb regexp='-Xmx192m' replace='-Xmx1024m'
- - name: Prepare jetty Puppetdb
- lineinfile: dest=/etc/puppetdb/conf.d/jetty.ini insertbefore='^# host = <host>' line="localhost"
- - name: Prepare jetty Puppetdb 2
- lineinfile: dest=/etc/puppetdb/conf.d/jetty.ini insertafter='^# host = <host>' line="host = 0.0.0.0"
- - name: Adding puppetdb.conf to Puppet
- template: src=puppetdb.conf dest=/etc/puppet/puppetdb.conf owner=puppet group=puppet mode=0644
- - name: Adding routes.yaml to Puppet
- template: src=routes.yaml dest=/etc/puppet/routes.yaml owner=puppet group=puppet mode=0644
- - name: run foreman installer
- 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