summaryrefslogtreecommitdiff
path: root/manifests/cron/openbsd.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/cron/openbsd.pp')
-rw-r--r--manifests/cron/openbsd.pp26
1 files changed, 9 insertions, 17 deletions
diff --git a/manifests/cron/openbsd.pp b/manifests/cron/openbsd.pp
index 084b022..0e4a813 100644
--- a/manifests/cron/openbsd.pp
+++ b/manifests/cron/openbsd.pp
@@ -1,32 +1,24 @@
class puppet::cron::openbsd inherits puppet::openbsd {
- include puppet::cron::base
- if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' }
- if $puppet_http_compression { $puppet_http_compression_str = '--http_compression' }
-
- 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} * * * *"
- }
+ include puppet::cron::base
Openbsd::Rc_local['puppetd']{
ensure => 'absent',
}
Cron['puppetd_check']{
- ensure => absent,
+ ensure => absent,
}
Cron['puppetd_restart']{
- ensure => absent,
+ ensure => absent,
}
cron { 'puppetd_run':
- command => "/usr/local/bin/puppet agent --onetime --no-daemonize --config=$puppet_config --color false $puppet_http_compression_str | grep -E '(^err:|^alert:|^emerg:|^crit:)'",
+ command => "/usr/local/bin/puppet agent --onetime --no-daemonize --config=$puppet::config --color false ${puppet::cron::base::http_compression_str} | grep -E '(^err:|^alert:|^emerg:|^crit:)'",
user => 'root',
- minute => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\1'),','),
- hour => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\2'),','),
- weekday => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\3'),','),
- month => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\4'),','),
- monthday => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\5'),',')
+ minute => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\1'),','),
+ hour => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\2'),','),
+ weekday => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\3'),','),
+ month => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\4'),','),
+ monthday => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\5'),',')
}
}