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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
mike_puppet@fadedink.co.uk
2010-Mar-30 12:46 UTC
[Puppet Users] Re: client to client problem
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 user@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 <islandje...@gmail.com> 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 puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.