summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/cron/base.pp46
1 files changed, 24 insertions, 22 deletions
diff --git a/manifests/cron/base.pp b/manifests/cron/base.pp
index 7daa6fb..7b40da6 100644
--- a/manifests/cron/base.pp
+++ b/manifests/cron/base.pp
@@ -1,32 +1,34 @@
# manifests/cron/base.pp
class puppet::cron::base inherits puppet::base {
-
+
+ case $operatingsystem {
+ debian: { if $lsbdistcodename != 'lenny' { $stop_service = true } else { $stop_service = false } }
+ openbsd, ubuntu: { $stop_service = false }
+ default: { $stop_service = true }
+ }
+
Service['puppet']{
enable => false,
}
- case $operatingsystem {
- debian,openbsd,ubuntu: {
- #it's already disabled
- }
- default: {
- $puppet_majorversion = regsubst($puppetversion,'^(\d+\.\d+).*$','\1')
- if $puppet_majorversion == '2.6' {
- Service['puppet']{
- ensure => stopped,
- }
- } else {
- Service['puppet']{
- hasstatus => false,
- pattern => 'puppetd',
- }
- # 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',
- require => Service['puppet'],
- }
+ if $stop_service == true {
+ $puppet_majorversion = regsubst($puppetversion,'^(\d+\.\d+).*$','\1')
+ if $puppet_majorversion == '2.6' {
+ Service['puppet']{
+ ensure => stopped,
+ }
+ } else {
+ Service['puppet']{
+ hasstatus => false,
+ pattern => 'puppetd',
+ }
+ # 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',
+ require => Service['puppet'],
}
}
}
}
+