Puppet Stand Alone - Templates, Configs
I’m working on getting all our servers standardized with puppet to minimize installation and maintenance hassle. Pretty exciting.
I’m setting all this up with puppet standalone. I don’t think we really gain anything by using the daemons, so it’s just a simple call to
puppet site.pp -v
And the changes are applied.
I ran into a snag today trying to get templates working. I kept getting the below error when trying to update my test system:
Could not find template ‘push.erb’ at /etc/puppet/manifests/site.pp:32 on node somename.myserver.local
Using strace:
[root@somename manifests]# strace -o ~/trace.txt -e trace=file puppet site.pp
Could not find template 'push.erb' at /etc/puppet/manifests/site.pp:32 on
node somename.myserver.local
[root@somename manifests]# tail -n 1 ~/trace.txt
stat("/var/puppet/templates", 0x7fffb7073a30) = -1 ENOENT (No such file or directory)
Fortunately there’s also config tool to check this stuff:
[root@somename manifests]# puppet --configprint templatedir
/var/puppet/templates
I have everything under /etc/puppet, NOT /var/puppet. I want the templates directory to reside in there too. I had a /etc/puppet/puppetd.conf file, and I set the templatedir variable in there under [puppetd] and [puppetmasterd] and [puppet] (I really had no idea which it needed) - and when that still didn’t work I tried renaming the config to puppet.conf. These are the lines I needed:
[puppet]
templatedir=/etc/puppet/templates
Thanks to the guys in #puppet on freenode for helping me sort this out.
See the puppet site and documentation for more info.