Puppet: System Administration Automated

Support

Ticket #868 (closed defect: invalid)

Opened 1 year ago

Last modified 1 year ago

Template relativ path not working

Reported by: immerda Assigned to: community
Priority: lowest Milestone:
Component: server Version: 0.23.2
Severity: trivial Keywords: template relative path
Cc: Triage Stage: Unreviewed
Attached Patches: None Complexity: Trivial

Description (Last modified by michael)

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?

Change History

10/12/07 17:33:48 changed by michael

  • description changed.

10/12/07 17:36:28 changed by DavidS

  • keywords changed from template telative path to template relative path.

Configuration parameters can be overriden per-binary. Could you please double check the output of puppetmasterd --configprint templatedir? This is the right binary, since templates are completely evaluated on the server.

Regards, David

10/13/07 11:45:41 changed by immerda

  • priority changed from normal to lowest.
  • status changed from new to closed.
  • complexity changed from Unknown to Trivial.
  • resolution set to invalid.
  • severity changed from normal to trivial.

Ok, from here comes definitely the wrong path:

puppetmasterd --configprint templatedir
/var/puppet/templates

However can this be overriden by config setting?

10/13/07 19:39:51 changed by luke

Are you running both of these commands on the same machine?

The template needs to be on the server, not on the client.

And please take this discussion to the mailing list, as it's not a bug.