diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-02-24 14:34:39 -0500 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-02-24 14:38:39 -0500 |
commit | 0bb70b28a7c7679d0e07fd75230d40203c0d53b5 (patch) | |
tree | acd91c59fea86768f81d98e262ed1677f646fa47 /manifests/master/checklastrun.pp | |
parent | beae5a608dd1b1d370917896d853a6b53ad73a45 (diff) | |
parent | 8584340c2aeac7d97a78b8303ab377b5049b80c2 (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.pp | 29 |
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'; + } +} |