From ec3b2e4b0bce960044c9433d0331c133e7fda639 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Wed, 30 Sep 2015 23:43:31 -0400 Subject: 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. --- manifests/cron/base.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3