From 291c1b7ebd093c421da2be7906030ce8caa2dffd Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 19 Aug 2010 11:31:24 +0200 Subject: work around a 2.6 issue --- manifests/cron/base.pp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'manifests') 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', -- cgit v1.2.3