summaryrefslogtreecommitdiff
path: root/manifests/puppetmaster/checklastrun.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2010-01-20 00:39:40 +0100
committervarac <varacanero@zeromail.org>2010-01-20 00:39:40 +0100
commit48e7f20051726623236b8dac1433ea7eddff2db7 (patch)
treed5ebc6dfa7df55d5d58463ea039f6d757d3a23a6 /manifests/puppetmaster/checklastrun.pp
parente53616384acf3678367f26a2e210381c5427d305 (diff)
cron reload for /etc/cron.d/puppet*, debian/ubuntu shellscripts under /usr/local/bin rather than /opt/bin
Diffstat (limited to 'manifests/puppetmaster/checklastrun.pp')
-rw-r--r--manifests/puppetmaster/checklastrun.pp17
1 files changed, 13 insertions, 4 deletions
diff --git a/manifests/puppetmaster/checklastrun.pp b/manifests/puppetmaster/checklastrun.pp
index 12f1042..76bfaec 100644
--- a/manifests/puppetmaster/checklastrun.pp
+++ b/manifests/puppetmaster/checklastrun.pp
@@ -1,12 +1,21 @@
class puppet::puppetmaster::checklastrun {
- file{'/opt/bin/puppetlast':
+ case $operatingsystem {
+ debian,ubuntu: { $puppetlast_dest = "/usr/local/bin/puppetlast" }
+ default: { $puppetlast_dest = "/opt/bin/puppetlast" }
+ }
+
+
+
+
+ file{"$puppetlast_dest":
source => [ "puppet://$server/modules/site-puppet/master/puppetlast",
"puppet://$server/modules/puppet/master/puppetlast"],
owner => root, group => 0, mode => 0700;
}
file{'/etc/cron.d/puppetlast.cron':
- content => "40 10,22 * * * root /opt/bin/puppetlast\n",
- require => File['/opt/bin/puppetlast'],
- owner => root, group => 0, mode => 0644;
+ content => "40 10,22 * * * root $puppetlast_dest\n",
+ require => File["$puppetlast_dest"],
+ owner => root, group => 0, mode => 0644,
+ notify => service["cron"];
}
}