summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2015-09-30 23:43:31 -0400
committerGabriel Filion <gabster@lelutin.ca>2015-09-30 23:43:31 -0400
commitec3b2e4b0bce960044c9433d0331c133e7fda639 (patch)
tree4d11a407a2f3804e3b59393576af3126e047c8a7
parent55677983a65e03efda27b5ec9419c77ce9b8f72a (diff)
fix default value case for $cron_time
with the current code it's impossible to use the automatically generated cron time spec since to get there you need to set $cron_time to false, and this one in turn gets converted to an integer. This throws an error. To fix this, we'll base the second timing to be 30mins after the first one.
-rw-r--r--manifests/cron/base.pp2
1 files changed, 1 insertions, 1 deletions
diff --git a/manifests/cron/base.pp b/manifests/cron/base.pp
index 82483df..ee2bbca 100644
--- a/manifests/cron/base.pp
+++ b/manifests/cron/base.pp
@@ -8,7 +8,7 @@ class puppet::cron::base inherits puppet::base {
if !$puppet::cron::cron_time {
$crontime_interval_minute = fqdn_rand(29)
- $crontime_interval_minute2 = inline_template("<%= 30+scope.lookupvar('puppet::cron::cron_time').to_i %>")
+ $crontime_interval_minute2 = 30 + $crontime_interval_minute
$crontime = "${crontime_interval_minute},${crontime_interval_minute2} * * * *"
} else {
$crontime = $puppet::cron::cron_time