Friday, July 30, 2010

Puppet on Centos 5

Didn't think it would be so complicated that I have to blog it to remind myself  :)

Setting up puppet master:

1> wget http://puppetlabs.com/downloads/facter/facter-latest.tgz
2> wget http://puppetlabs.com/downloads/puppet/puppet-2.6.0.tar.gz
tar xzvf facter-latest.tgz  (then: ruby install.rb)
tar xzvf puppet-2.6.0.tar.gz (then: ruby install.rb)

Some spelling errors on code:

Run:  puppetmasterd --genconfig|grep factpath
Should look like this:  factpath = /var/lib/puppet/lib/facter:/var/lib/puppet/facts
Should not look: factpath = /var/lib/puppet/lib/facter/${File::PATH_SEPARATOR}$/var/lib/puppet/facts

If bad factpath, edit default.rb in lib/puppet directory and reinstall. Grep for PATH_SEPARATOR and replace the line with:

:factpath => {:default => "$vardir/lib/facter:$vardir/facts",

Go to the conf dir and copy the server.init to /etc/init.d

Make sure /etc/hosts on both client and server know how to ping each other.

No comments: