diff options
author | varac <varacanero@zeromail.org> | 2010-01-20 00:39:40 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2010-01-20 00:39:40 +0100 |
commit | 48e7f20051726623236b8dac1433ea7eddff2db7 (patch) | |
tree | d5ebc6dfa7df55d5d58463ea039f6d757d3a23a6 | |
parent | e53616384acf3678367f26a2e210381c5427d305 (diff) |
cron reload for /etc/cron.d/puppet*, debian/ubuntu shellscripts under /usr/local/bin rather than /opt/bin
-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"]; } } |