This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== Foreman ===== Tested on Centos 7 ==== Installation ==== <code> hostnamectl set-hostname foremanserver echo "$IPADDRESS foremanserver.walmart.cr foremanserver" >> /etc/hosts yum update yum -y install https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm yum -y install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum -y install https://yum.theforeman.org/releases/1.20/el7/x86_64/foreman-release.rpm yum -y install foreman-installer </code> Run: <code> foreman-installer -i </code> When installation is completed you will receive a message similar to: <code> * Foreman is running at https://foremanserver.walmart.cr Initial credentials are admin / HQyjzADDVs6PunGX * Foreman Proxy is running at https://foremanserver.walmart.cr:8443 * Puppetmaster is running at port 8140 The full log is at /var/log/foreman-installer/foreman.log </code> Configure firewall: <code> firewall-cmd --add-service=https --permanent firewall-cmd --add-port=8443/tcp --permanent firewall-cmd --add-port=8140/tcp --permanent firewall-cmd --reload </code> ==== Ansible integration ==== Install ansible: <code> yum install ansible </code> Change /etc/ansible/ansible.cfg to contain: <code> callback_whitelist = foreman </code> Add a section [callback_foreman] at the end of /etc/ansible/ansible.cfg like this: <code> [callback_foreman] url = 'https://foremanserver.walmart.cr' ssl_cert = /etc/puppetlabs/puppet/ssl/certs/foremanserver.walmart.cr.pem ssl_key = /etc/puppetlabs/puppet/ssl/private_keys/foremanserver.walmart.cr.pem verify_certs = /etc/puppetlabs/puppet/ssl/certs/ca.pem </code> Install required plugins: <code> foreman-installer --enable-foreman-plugin-ansible --enable-foreman-proxy-plugin-ansible foreman-installer --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh </code> ==== Configure Ansible ==== ==== References ==== * https://www.theforeman.org/plugins/foreman_ansible/2.x/index.html * https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-centos-7 * https://www.theforeman.org/manuals/1.20/quickstart_guide.html