From 48e7f20051726623236b8dac1433ea7eddff2db7 Mon Sep 17 00:00:00 2001 From: varac Date: Wed, 20 Jan 2010 00:39:40 +0100 Subject: cron reload for /etc/cron.d/puppet*, debian/ubuntu shellscripts under /usr/local/bin rather than /opt/bin --- manifests/puppetmaster/checklastrun.pp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'manifests/puppetmaster') 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"]; } } -- cgit v1.2.3