diff options
-rw-r--r-- | manifests/cron/base.pp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/manifests/cron/base.pp b/manifests/cron/base.pp index 2289a3c..b30b5b3 100644 --- a/manifests/cron/base.pp +++ b/manifests/cron/base.pp @@ -10,11 +10,19 @@ class puppet::cron::base inherits puppet::base { #it's already disabled } default: { - Service['puppet']{ - hasstatus => false, + $puppet_majorversion = regsubst($puppetversion,'^(\d+\.\d+).*$','\1') + if $puppet_majorversion == '2.6' { + Service['puppet']{ + ensure => stopped, + } + } else { + Service['puppet']{ + hasstatus => false, + } } } } + # this works only on < 2.6 exec{'stop_puppet': command => 'kill `cat /var/run/puppet/puppetd.pid`', onlyif => 'test -f /var/run/puppet/puppetd.pid', |