With puppet 0.23.2 with gentoo on puppetmasterd and same verion on a centos 5 client, setting the template with a relativ path did not work:
First I tried:
content => template('apache/default/default_index.erb')
which raised this error:
err: Could not retrieve configuration: Could not find template apache/default/default_index.erb at /etc/puppet/manifests/classes/apache.pp:25
However the template was clearly there:
puppet --configprint templatedir
/var/lib/puppet/templates
ls -l /var/lib/puppet/templates/apache/default/default_index.erb
-rw-r--r-- 1 root root 578 2007-10-12 01:19 /var/lib/puppet/templates/apache/default/default_index.erb
then I moved the template (it was my first) to the / of templatedir:
content => template('default_index.erb')
which raised the same error:
err: Could not retrieve configuration: Could not find template default_index.erb at /etc/puppet/manifests/classes/apache.pp:25
However I then put:
content => template('/var/lib/puppet/templates/apache/default/default_index.erb')
and this worked. Even running puppetmasterd with --debug --verbose --trace during the relativ path tests didn't change the amount of information regarding to the template. Also setting
templatedir=/var/lib/puppet/templates/
in the [puppetd] section of puppet.conf on the puppetmasterd didn't help.
So for me the relativ path setting of templates seems to be broken. Or do I have done something fundamentaly wrong?! How could I investigate further?