summaryrefslogtreecommitdiff
path: root/manifests/cron/linux.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-08-07 01:58:08 +0200
committermh <mh@immerda.ch>2010-08-07 01:58:08 +0200
commitc246871b7a39ce39edf6a509e8b30baff2f2a8ad (patch)
treec663fe476ce202b15e49938149d532b87c4a6a11 /manifests/cron/linux.pp
parentd739d6f348ad16391b5c95761e98b188cfeed848 (diff)
improve puppet_cron
* don't use builtin splay, splay runs depending on the fqdn of a host -> puppet isn't running until it really should * fix various things for cron on openbsd
Diffstat (limited to 'manifests/cron/linux.pp')
-rw-r--r--manifests/cron/linux.pp8
1 files changed, 6 insertions, 2 deletions
diff --git a/manifests/cron/linux.pp b/manifests/cron/linux.pp
index c13c10a..46735e0 100644
--- a/manifests/cron/linux.pp
+++ b/manifests/cron/linux.pp
@@ -3,10 +3,14 @@ class puppet::cron::linux inherits puppet::linux {
include puppet::cron::base
if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' }
- if !$puppet_crontime { $puppet_crontime = '0,30 * * * *' }
+ if !$puppet_crontime {
+ $puppet_crontime_interval_minute = fqdn_rand(29)
+ $puppet_crontime_interval_minute2 = inline_template('<%= 30+puppet_crontime_interval_minute.to_i %>')
+ $puppet_crontime = '${puppet_crontime_interval_minute},${puppet_crontime_interval_minute2} * * * *'
+ }
File['/etc/cron.d/puppetd.cron']{
source => undef,
- content => "# run puppet\n$puppet_crontime root /usr/sbin/puppetd --onetime --no-daemonize --splay --config=$puppet_config --color false | grep -E '(^err:|^alert:|^emerg:|^crit:)'\n",
+ content => "# run puppet\n$puppet_crontime root /usr/sbin/puppetd --onetime --no-daemonize --config=$puppet_config --color false | grep -E '(^err:|^alert:|^emerg:|^crit:)'\n",
}
}