Running puppet-2.6.13-2.el6.noarch on CentOS 6. define backup($apphost, $appfqdn) { cron { "backup-${apphost}-daily": command => "/usr/bin/rsync -a $appfqdn:backups/ $backdir/daily --delete", hour => "2", minute => fqdn_rand(60), } }
then elsewhere @@backup { $::hostname: appfqdn => $::fqdn, apphost => $::hostname, } Easy enough, or so I thought. Some time after I initially wrote this, I investigated some I/O spikes and sure enough, all of my backups are running at the same minute -- the fqdn_rand is being calculated for the backup server, not for the slaves being backed up. I have worked around this by passing in a $minute argument, but this seems a bit inelegant -- the slave certainly has no business determining the backup schedule. Other than a feature request for fqdn_rand to allow a value to be passed in, any ideas on a more elegant way to accomplish this? Criticism welcome! -- 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.