I’m trying to keep a log of my fixes, stuff learned while using puppet.
Many have skipped my mind already. 😦
I’ll try to change publish date on this post every time I edit it so that it stays on top.
How to find config settings or env variables in puppet?
$ puppet --configprint templatedir # Specific Env Variable
templatedir = /var/lib/puppet/templates
$ puppet --configprint all # Specific Env Variable
How to syntax check your templates?
$ erb -x -T '-' ../files/apt/sources.list.erb | ruby -c
$ erb -x -T '-' ../files/apt/sources.list.d/lenny-backports.list.erb | ruby -c
Unable to sign certificates?
The errors could be:
a. hostname was not match with the server certificate (or)
b. Exiting; no certificate found and waitforcert is disabled
In both cases you will not find the certificate on pupptemaster to sign.
1. /etc/hosts file on client should have the server listed in format
IPAddress hostname_of_server short_hostname_of_server puppet
Example: 192.168.1.90 predator01.mydomain.local predator01 puppet
2. Make sure that the domain and search parameters in /etc/resolv.conf of client is same as your host domain
And my hostname is human01.mydomain.local
If your hostname is like human01.yourdomain.com then 'domain' and 'search' in /etc/resolv.conf should be domain.com
3. After ensuring (1) and (2) are fixed as above, clear ssl stuff
$ cd /var/lib/puppet/ssl
$ sudo mkdir old
$ sudo mv * old/
4. Now run client again
$ sudo puppetd -tdv
5. On server sign the cert
$ sudo puppetca --list
$ sudo puppetca --sign human01.yourdomain.local