On 01/05/2011 12:49 PM, Cosimo Streppone wrote: > Here's a problem I didn't really think about for > so long. I'm kind of hoping somebody solved it > already :) > > I'm working on a "geoip" module that among other > things, installs a cronjob to update the geoip > databases periodically. > > Now the cronjob is just a plain file resource > that puppet drops into '/etc/cron.d/'. > > == Problem == > > Doing that on 50 machines will result > in all of them trying to download the geoip dbs > at the same time. > > == Possible solutions == > > 1) prepend the cronjob task with "perl -e 'sleep rand 3600' ; " > or equivalent > > 2) have a puppet template "randomize" the cron minute, hour and > eventually day. > > == Question == > > About 2), how do I randomize a template and have puppet avoid > replacing it whenever there's a new run? > > Is there a way to do this? >
Yes. Ideally: http://docs.puppetlabs.com/references/stable/function.html#fqdnrand -- 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.