On Monday, December 17, 2012 6:03:38 AM UTC-6, krishna bhaskara rao wrote:
>
> Hi,
>
> I am using below script to move files from puppet master to puppet agent.
> file { "/usr/local/temp":
>                ensure => "file",
>                source => "puppet:///files/temp",
>                 mode   => 777,
> }
> If I use this script, file always transferring from master to agent.
> But my requirement like, if is there any changes in file then only have to 
> transfer file from puppet master to puppet agent.
> Is it possible can you me any as early as possible ?.
>
>

That resource declaration says: "the target node should have a file 
/usr/local/temp, with mode 777 (octal), whose content exactly matches the 
content currently available from URL puppet:///files/temp (which refers to 
the built-in file server on the master that served the catalog)."  The 
Puppet agent will check on every run whether the declaration is already 
satisfied, and will update the target file as necessary to make it comply.  
The agent will *not* download the file again if it already matches, but it 
will do if the file has changed *on either side*.

By default, Puppet checks for matching file content by computing and 
comparing md5 checksums (so specifying that explicitly is unnecessary).  
The client computes the one for its local file, and the master computes and 
reports the one for the remote file.

There are several ways to modulate Puppet's behavior here by changing or 
adding to your declaration, but to recommend anything we need to be sure we 
know what your real requirements are.  The behavior you say you want sounds 
very much like what Puppet does by default, so if it's really behaving 
differently then there must be something you're not telling us.


John

-- 
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/-/xBsXCZcRB1wJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to