On 12/09/2010 01:17 PM, Arnau Bria wrote: > Hi all, > > I'd like to start using templates and I'm doing some test with one of > my already working class (bacula). > > Following dir structure: > module_name/manifests/init.pp > /templates/file.erb > > > my template wants to copy a file and change a value for client hostname: > > init.pp: > [...] > '/etc/bacula/bacula-fd.conf.template': > ensure => present, > content => template("baculafd.erb"); } > [...] > > > cat templates/baculafd.erb > > [...] > FileDaemon { > Name = <%= hostname %=> > FDport = 9102 # where we listen for the director > WorkingDirectory = /var/lib/bacula > Pid Directory = /var/run > Maximum Concurrent Jobs = 20 > } > [...] > > Doc says: > "Templates are always evaluated by the parser, not by the client. This > means that if you are using puppetmasterd, then the templates only need > to be on the server, and you never need to download them to the client." > > But when I run puppet, client complains : > > # puppetd --test --server ser01.pic.es > err: Could not retrieve catalog from remote server: Error 400 on > SERVER: Could not find template 'baculafd.erb' > at > /etc/puppet/manifests/services/workernode/modules/computing_bacula/manifests/init.pp:27 > on node X > > Why is it complaining if dir structure is correct? > > ar...@lx-arnau > ~/puppet/manifests/services/workernode/modules/computing_bacula $ ls > files manifests templates > ar...@lx-arnau > ~/puppet/manifests/services/workernode/modules/computing_bacula $ ls > templates/ > baculafd.erb
Hi, according to http://docs.puppetlabs.com/guides/modules.html, you should be using content => template("computing_bacula/baculafd.erb"); including the module name in the template path. HTH, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.