I would probably do this with cron/rsync unless there is a very
pressing need to do it in puppet. However, to achieve this in puppet
you could create a function that checks to see if this file exists,
and transfers it if so. Something like:

define filecheck ($file) {
   file { "$file":
       owner => root, group => root, mode => 755,
       ensure => file,
   }
   exec { "filecheck-$name":
       command => "rsync $file u...@client2:/remote/file/path/",
       require => [File["$name"]],
   }
}

You would add that to the node definition for client 1. This assumes
you have key-based authentication set up between your clients. Btw, I
am not a puppet expert and quickly wrote this during my lunch-break
without testing, so it might not work as expected.

Cheers,

Mike


On Mar 30, 12:27 pm, Jewels <[email protected]> wrote:
> Good morning,
>
> Not sure if this is even possible. I have a situation with a server
> and 2 clients. I have a file that gets created on 1 client that needs
> to be moved to the other client within the 30 minute time frame of
> being created. I could use a cron job with rsync, but was wondering if
> there might be some way to get the client to see this file and move it
> to the other client. Or would it be possible to get the server to see
> it and know to move it over to the other client?
>
> Any ideas?
>
> thanks
> ~J~

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
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