summaryrefslogtreecommitdiff
path: root/manifests/master/checklastrun.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/master/checklastrun.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/master/checklastrun.pp')
-rw-r--r--manifests/master/checklastrun.pp29
1 files changed, 29 insertions, 0 deletions
diff --git a/manifests/master/checklastrun.pp b/manifests/master/checklastrun.pp
new file mode 100644
index 0000000..2544acc
--- /dev/null
+++ b/manifests/master/checklastrun.pp
@@ -0,0 +1,29 @@
+# check for last run
+class puppet::master::checklastrun {
+
+ $puppet_lastruncheck_ignorehosts_str = $puppet::master::lastruncheck_ignorehosts ? {
+ '' => '',
+ undef => '',
+ default => "--ignore-hosts ${puppet::master::lastruncheck_ignorehosts}"
+ }
+
+ $puppet_lastruncheck_timeout_str = $puppet::master::lastruncheck_timeout ? {
+ '' => '',
+ undef => '',
+ default => "--timeout ${puppet::master::lastruncheck_timeout}"
+ }
+
+ file{
+ '/usr/local/sbin/puppetlast':
+ source => 'puppet:///modules/puppet/master/lastruncheck',
+ owner => root,
+ group => 0,
+ mode => '0700';
+ '/etc/cron.d/puppetlast':
+ content => "${puppet::master::lastruncheck_cron} root /usr/local/sbin/puppetlast ${puppet_lastruncheck_timeout_str} ${puppet_lastruncheck_ignorehosts_str} ${puppet::master::lastruncheck_additionaloptions} | grep -Ev '^OK: '\n",
+ require => File['/usr/local/sbin/puppetlast'],
+ owner => root,
+ group => 0,
+ mode => '0644';
+ }
+}