Reference: http://puppetlabs.com/puppet/puppet-open-source/
$ sudo yum install puppet-server
Create te file “/etc/puppet/manifests/site.pp” and insert the content below:
import "classes/*"
node default {
include sudo
}
Create the file “/etc/puppet/manifests/classes/sudo.pp” and insert the content below:
class sudo {
file { "/etc/sudoers":
owner => "root",
group => "root",
mode => 440,
}
}
#Start puppet master and enable startup on boot
$ sudo service puppetmaster start
$ sudo chkconfig puppetmaster on
$ sudo yum install puppet
Edit the file “/etc/sysconfig/puppet” to looks like below:
# The puppetmaster server
PUPPET_SERVER=[YOUR_PuppetMaster_DNS]
PUPPET_PORT=8140
PUPPET_LOG=/var/log/puppet/puppet.log
PUPPET_EXTRA_OPTS=--waitforcert=30
#Start puppet client and enable startup on boot
$ sudo service puppet start
$ sudo chkconfig puppet on
Signing the SSL key from the Puppet Client (in the Puppet Master server):
$ sudo puppetca --list
puppetclient.localdomain
$ sudo puppetca --sign puppetclient.localdomain
$ sudo puppetca --list
puppetclient.localdomain
$ sudo puppetca --sign puppetclient.localdomain
Insert in the file “/etc/puppet/autosign.conf” the content like the example below:
*.yourinternaldomain.com
$ sudo puppet agent --server puppetmaster.my.localdomain -t
Rafael Inocencio <[email protected]>
https://github.com/rcicm