On Thursday, November 28, 2013 5:09:09 AM UTC-6, Waqar Khan 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. 
>
>

Your DSL looks ok to me on first glance.  I think the error message is 
telling you that <modulepath>/testing/files/files (doubled "/files" 
intentional) does not exist on your master, or is not readable by the 
master.  Do you perhaps mean to use

  source => 'puppet:///modules/testing/testscript'

, which would try to sync a directory <modulepath>/testing/files/testscript 
from your master to your clients?  With

  recurse => true

, as you specify, the directory's contents should be synced as well.  The 
name of the source directory on the master does not need to match the name 
of the target directory on the client, but you do need to give it.


John

-- 
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/6a1b34bd-a4b1-43f6-992e-bd9851f504bf%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to