I hope there are not a lot of files in that directory because I believe you have to manage each one. I could be mistaken, but I do not know of a way to do it. There may be a way to shortcut the operation, but I believe you need a resource declared for every file and directory you want to manage.
On Nov 28, 2013, at 6:09 AM, Waqar Khan <[email protected]> wrote: > Can someone help, im trying to send an entire directory with its contents to > the puppet agent. Here is the init.pp file: > > class testing { > file { "C:/test/": > > ensure => directory, > owner => 'Administrator', > group => 'Administrators', > mode => '0755', > } > > file { "C:/test/testscript": > > ensure => directory, > owner => 'Administrator', > group => 'Administrators', > mode => '0755', > source => "puppet:///modules/testing/files", > recurse => true, > > } > } > > > When running the agent on the puppet it gives this error: > > error: /stage[main]Testing/File/[testscript]: Could not evalate: Could not > retrieve information from environment production source > puppet:///modules/testing/files at > /etc/puppet/modules/testing/manifests/init.pp:17 > I can serve single files but not a directory. > Many thanks :) > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/e2105f30-5e7d-43db-b6db-f8ae6b1bf512%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/EE20FF00-0313-40DA-AB8E-4B3EB4D67DAF%40comcast.net. For more options, visit https://groups.google.com/groups/opt_out.
