summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-08-07 01:31:17 +0200
committermh <mh@immerda.ch>2010-08-07 01:33:12 +0200
commit7df4eabf27357731cbdf6946591df92ac15e8ed2 (patch)
tree0a64fdb341d4d239a56b82bd3e8555dd41a76aba /manifests
parent55c61cf9ab8752663bdce0604ca4d7ef6647142f (diff)
improve checklastrun script
Diffstat (limited to 'manifests')
-rw-r--r--manifests/puppetmaster.pp12
-rw-r--r--manifests/puppetmaster/checklastrun.pp2
-rw-r--r--manifests/puppetmaster/checklastrun/disable.pp9
3 files changed, 21 insertions, 2 deletions
diff --git a/manifests/puppetmaster.pp b/manifests/puppetmaster.pp
index a6d5d77..71cab3a 100644
--- a/manifests/puppetmaster.pp
+++ b/manifests/puppetmaster.pp
@@ -11,7 +11,17 @@ class puppet::puppetmaster inherits puppet {
}
include puppet::puppetmaster::base
- include puppet::puppetmaster::checklastrun
+
+
+ case $puppetmaster_checklastrun {
+ '': { $puppetmaster_checklastrun = '40 10,22 * * *'
+ }
+
+ if $puppetmaster_checklastrun {
+ include puppet::puppetmaster::checklastrun
+ } else {
+ include puppet::puppetmaster::checklastrun::disable
+ }
if $puppetmaster_mode == 'passenger' {
include puppet::puppetmaster::pasenger
diff --git a/manifests/puppetmaster/checklastrun.pp b/manifests/puppetmaster/checklastrun.pp
index 96d59d5..a8978f3 100644
--- a/manifests/puppetmaster/checklastrun.pp
+++ b/manifests/puppetmaster/checklastrun.pp
@@ -5,7 +5,7 @@ class puppet::puppetmaster::checklastrun {
owner => root, group => 0, mode => 0700;
}
file{'/etc/cron.d/puppetlast.cron':
- content => "40 10,22 * * * root /usr/local/bin/puppetlast\n",
+ content => "${puppetmaster_checklastrun} root /usr/local/bin/puppetlast ${puppetmaster_checklastrun_timeout}\n",
require => File["/usr/local/bin/puppetlast"],
owner => root, group => 0, mode => 0644,
}
diff --git a/manifests/puppetmaster/checklastrun/disable.pp b/manifests/puppetmaster/checklastrun/disable.pp
new file mode 100644
index 0000000..47c0130
--- /dev/null
+++ b/manifests/puppetmaster/checklastrun/disable.pp
@@ -0,0 +1,9 @@
+class puppet::puppetmaster::checklastrun::disable inherits puppet::puppetmaster::checklastrun {
+ File['/usr/local/bin/puppetlast']{
+ ensure => absent,
+ }
+ File['/etc/cron.d/puppetlast.cron']{
+ ensure => absent,
+ }
+}
+