For something that's a bit more generic, you can also just use $RANDOM with sleep. $RANDOM returns between 0 and 32k as a value, and you can use a divider to reduce it. For example, I use 'sleep $(($RANDOM/10)) && do_heavy_stuff' to randomize the start of a heavy job out across just under a hour.
BR. RuneSt. On 5 Jan, 12:58, "Cosimo Streppone" <[email protected]> wrote: > On Wed, 05 Jan 2011 12:50:41 +0100, Felix Frank > > <[email protected]> wrote: > > On 01/05/2011 12:49 PM, Cosimo Streppone wrote: > > >> 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 > > Yes, that's *exactly* what I need. > > Great stuff, thanks! > > -- > Cosimo -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
