Solving Puppet Errors
The purpose of this document is to help solve puppet errors.
Error: Syntax error
err: Could not parse for environment production: Syntax error at 'ensure'; expected '}' at /opt/git/puppet/modules/bashrc/manifests/init.pp:18 err: Try 'puppet help parser validate' for usage
Try this: puppet parser validate /opt/git/puppet/modules/bashrc/manifests/init.pp
Error: dnsdomainname: Unknown host
[root@ip-10-0-5-101 bashrc]# puppet help validate dnsdomainname: Unknown host
Fix it by making your DNS (e.g., hosts file) actually resolve your IP (127.0.0.1) to the hostname you wish: 127.0.0.1 localhost localhost.localdomain reellio-com01
Error: Certificate mismatch
Sample error message
Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key
Error cause
The puppet master signed a key for a host with the same hostname or IP previously. The error can happen after running Puppet for the first time with "puppet agent --no-daemonize --onetime --logdest console" for example.
Error resolution
On the master
puppetca --clean <hostname>
puppetca --clean <hostname>
Yes, do it again.
On the client
rm -rf /var/lib/puppet/ssl/
puppet agent --no-daemonize --onetime --logdest console