Hi Warden,

Exporting a file resource will not export its content, unless the content 
is part of the resource (ie. using "content => " or "source => "). By just 
giving a path you will always end-up with an empty file.
I guess a better approach would be to maintain all files somewhere on your 
Puppet master, and them deploy them to your nodes. This even works 
recursively with directories.

Toni



On Wednesday, April 23, 2014 6:00:30 PM UTC+2, warden wrote:
>
> Hi,
>
> I am trying to copy files between nodes using exported resources.
> What I want to do is to copy contents of the file from node1 to node2 
> (exactly same location), basicly rsync functionality.
>
> Here is my scenario:
>
> node1 and node2 include a common class
>
> in common.pp i have:
>   @@file { "filename-${hostname}":
>     path => "/file/path/somefile",
>   }
>  
> As I understand this is collecting filename-node1 and filename-node2.
> Then, in node2 I have a line:
>
> File<<| title == 'filename-node2' |>>
>
> Unfortunately, I get always an empty file on node2. Did I misunderstand 
> the way Exported Resources work?
>
> Thanks,
> Radek
>
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/89e1eba1-d88d-4ea4-941a-061c744d12d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to