[Puppet Users] Simple issue with templates.

Matthew Macdonald-Wallace
Mon, 03 May 2010 16:14:04 -0000

Hi all,

My brain is now officially dead!

I have a series of modules that have a tree layout as documented in the
"best practice" guide.

One of the directories I have is "templates" and in this directory I
have placed a template.erb file, however no matter how I refer to the
path in my init.pp, I cannot get it to include.

I''ve even set "templatedir" to /usr/share/puppet/modules (the
module
dir) in /etc/puppet/puppet.conf but I keep getting the following error:

debug: Scope(Yumrepository[mcollective]): Retrieving template
puppet:///yumrepositories/templates/repo.template.rb
err: Puppet::Module::InvalidName
at /usr/share/puppet/modules/yumrepositories/manifests/init.pp:22

The relevant file stanza is:

file { "/etc/yum.repos.d/$title.repo":
                        owner   => root,
                        group   => root,
                        mode    => 644,
                        content =>
template("puppet:///yumrepositories/templates/repo.template.rb"),
                }

Do I _really_ have to place the templates in /var/lib/puppet/template/ ?

I''m hoping to package a number of these manifests as moduels in git and
I really want to be able to deploy direct from git rather than cloning
and then having to copy the template into place.

Thanks in advance,

Matt


--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at