diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-10-09 17:18:59 +0000 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-10-09 17:18:59 +0000 |
commit | c3f2067f970ffaa79ff5df56101208211786f162 (patch) | |
tree | aeac596294dad1ea5d76e3851e44e6957204ca5a /manifests | |
parent | 83850f6c08804fa32eded3c6bb420eba1eba46a8 (diff) | |
parent | 483e40d410ce495cc4d6ad0265b3a1948b72e493 (diff) |
Fix cron time
This is a first attempt at fixing $cron_time. It's currently impossible to use the automatically generated timings. This would fix #4 .
See merge request !4
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/cron.pp | 2 | ||||
-rw-r--r-- | manifests/cron/base.pp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/manifests/cron.pp b/manifests/cron.pp index c26e079..4ac6cb4 100644 --- a/manifests/cron.pp +++ b/manifests/cron.pp @@ -1,6 +1,6 @@ # run puppet agent as cron class puppet::cron( - $cron_time, + $cron_time = false, $stop_service = true, $config = '/etc/puppet/puppet.conf', $config_content = false, 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 |