I like the idea of having puppet manage a directory by mirroring it
using rsync. The function you have seems pretty good, one thing
missing is some logging. I have run in to times where you only want to
sync on puppetruns and not during a predetermined time period using
cron. I normally write scripts that issue a puppetrun for a specific
host as part of it's execution.

Also did you every git the mirror function to work?

On Jul 13, 2:28 pm, Scott Smith <sc...@ohlol.net> wrote:
> Jeff wrote:
> >   newfunction(:mirror) do |args|
> >     user  = args[0]
> >     host  = args[1]
> >     src   = args[2]
> >     dest  = args[3]
> >     cmd   = "/usr/bin/rsync-vaz --delete --delete-during --rsh=\"ssh -
> > i /var/puppet/.ssh/" +
> >             user +" -l " + user +"\" " + src + " " + host + ":" + dest
> >     exec(cmd)
>
> You might want to sanitize those parameters before blindly passing them
> to a shell.
>
> -scott
>
> --
> sc...@ohlol.net
>
> http://github.com/ohlol
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to