summaryrefslogtreecommitdiff
path: root/manifests/cron/openbsd.pp
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-02-24 14:34:39 -0500
committerJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2015-02-24 14:38:39 -0500
commit0bb70b28a7c7679d0e07fd75230d40203c0d53b5 (patch)
treeacd91c59fea86768f81d98e262ed1677f646fa47 /manifests/cron/openbsd.pp
parentbeae5a608dd1b1d370917896d853a6b53ad73a45 (diff)
parent8584340c2aeac7d97a78b8303ab377b5049b80c2 (diff)
Merge branch 'master' of git://git.puppet.immerda.ch/module-puppet
Conflicts: files/master/config.ru files/master/puppet.conf manifests/base.pp manifests/centos.pp manifests/cron.pp manifests/cron/base.pp manifests/cron/linux.pp manifests/debian.pp manifests/init.pp manifests/linux.pp manifests/master/linux.pp manifests/master/package/debian.pp manifests/puppetmaster/base.pp manifests/puppetmaster/centos.pp manifests/puppetmaster/checklastrun.pp manifests/puppetmaster/checklastrun/disable.pp manifests/puppetmaster/cleanup_reports.pp manifests/puppetmaster/cleanup_reports/disable.pp manifests/puppetmaster/debian.pp manifests/puppetmaster/package.pp manifests/puppetmaster/package/base.pp manifests/puppetmaster/passenger.pp
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'),',')
}
}