diff options
-rw-r--r-- | manifests/linux.pp | 3 | ||||
-rw-r--r-- | manifests/puppetmaster/checklastrun.pp | 17 |
2 files changed, 15 insertions, 5 deletions
diff --git a/manifests/linux.pp b/manifests/linux.pp index afbda8d..55fa623 100644 --- a/manifests/linux.pp +++ b/manifests/linux.pp @@ -13,6 +13,7 @@ class puppet::linux inherits puppet::base { file{'/etc/cron.d/puppetd.cron': source => [ "puppet://$server/modules/puppet/cron.d/puppetd.${operatingsystem}", "puppet://$server/modules/puppet/cron.d/puppetd" ], - owner => root, group => 0, mode => 0644; + owner => root, group => 0, mode => 0644, + notify => service["cron"]; } } 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"]; } } |