I have a 'config-file' definition which handles config files for various modules that I've written. I'm trying to enhance it so that I can pass in a package to require because at the moment puppet is erroring trying to create config files before the relevant package has created certain directories:
# Generic config file define config-file ($fullpath, $source) { if $require { require $require } file { $fullpath: source => "puppet://puppet.hq.eso.org/modules/${source}", backup => mainbackup, mode => 644, ensure => file, group => root, owner => root } } Then in one of my modules I'm trying to use it with: config-file { "amandaconf": fullpath => "/etc/amanda/amanda- client.conf", source => "amanda/amanda-client.conf", require => Package["amanda-backup_client"] } But I get this error on the client: err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `downcase' for #<Puppet::Parser::Resource::Reference:0x2ae33d189ed0> at /etc/puppet/ manifests/site.pp:38 on node sl5build.hq.eso.org It looks like I've got the syntax wrong but I've tried several variations and I either get this error or a plain syntax error. I've also tried following these instructions: http://docs.reductivelabs.com/guides/language_tutorial.html#definitions -- 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.