Hi!

I have a helper module called helper with a define which looks like this:

define helper::files ($path='', $requires='', $owner=root, $group=root, 
$mode=644, $ensure=present) {
    file { "${name}":
      ensure   => $ensure,
      owner    => $owner,
      group    => $group,
      mode     => $mode,
      source   => "${path}",
      require  => $requires,
    }
  }
 
I have a bunch of files I want to be copied within my Apache2 Module:

$files = [  "/var/www/favicon.ico",
              "/var/www/error/error.html",
              "/var/www/error/logo.jpg",
              "/etc/apache2/ssl/ca.crt",
              "/etc/apache2/conf.d/charset",
              "/etc/apache2/conf.d/security",
  ]

When I call the define from within my apache2 class with this:

helper::files{$files:
    owner     => root,
    group     => root,
    mode      => 644,
    path      => "puppet:///files/apache2/",
    ensure    => present,
    requires  => File[$folders]
  }

I get the following error:

err: 
/Stage[main]/Apache2/Helper::Files[/etc/apache2/conf.d/security]/File[/etc/apache2/conf.d/security]:
 
Could not evaluate: Could not retrieve information from source(s) 
puppet:///files/apache2 at 
/etc/puppet/env/production/modules/helper/manifests/files.pp:9

for every file in my list. I am running Puppet 3.0.1 and have the 
workaround 
from 
https://groups.google.com/forum/?fromgroups=#!starred/puppet-users/eQpr0-zd3dM 
runing. Anybody an idea how I can get my solution to work? Is it a good 
idea to do this so? I usually had the install define within the class. But 
puppet-lint didn't like this so I thought outsourcing it to its own module 
would work out. Obviously it doesn't.

I am looking forward to your responses.

Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/JksunZeBsGcJ.
To post to this group, send email to puppet-users@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.

Reply via email to