I'm trying to use the puppetmaster to mirror directories. Here's my
function:

module Puppet::Parser::Functions
  ##++
  ## function: mirror
  ## arg[0]    user - the login name and corresponding key
  ## arg[1]    host - remote host
  ## arg[2]:   src  - local directory
  ## arg[3]:   dest - remote directory
  ## returns:  void
  ##--
  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)
  end
end

This seems pretty straight-forward but the first time I hit this
function, the puppetmaster dies and leaves no traces in the logs for
troubleshooting the problem. I tested the rsync command and it works
fine. Any ideas?

BTW: If there's an easier way to synchronize directories, I'm open to
using it. The problem I've had in puppet is removing files from dest
if they're removed in the source directory.




--~--~---------~--~----~------------~-------~--~----~
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