Trevor Vaughan wrote:

Mainly sugar around the call with the ability to twiddle all of the
useful rsync flags in a platform-agnostic manner where possible.

That would be truly awesome.

I have such a define in my module "nsc-puppet-utils" (available at
http://www.nsc.liu.se/~bellman/nsc-puppet-utils.git).  You use it
like this:

    rsync_mirror {
        epel-5-x86_64:
            source => "rsync://mirrorhost/fedora-epel/5/x86_64/./",
            target => "/pkg/epel-5.x86_64",
            rsyncflags => ['--exclude', 'repoview', '--exclude', 'debug'],
            creates => "/pkg/epel-5.x86_64/repodata/repomd.xml",
            hour => 3, minute => 25;
    }

This does two things: when run the first time, it actually does
an rsync of a directory tree.  And then it creates a cron job
for keeping the tree synchronized with the source.  You use the
'creates' parameter to indicate a file that you expect to exist
in the tree, so Puppet itself doesn't have to run rsync every
time.  If you mirror a large tree that could take a long time,
even if no files actually need to be transferred (I use it to
keep a mirror of CentOS and EPEL on a cluster, so we can re-install
our nodes anytime without being dependant on external servers).

Is this what you want?  Any suggestions for improvements?


        /Bellman

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-us...@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