summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2011-09-17 16:03:13 +0200
committerMicah Anderson <micah@riseup.net>2012-03-01 00:06:37 -0500
commit648e60b2ef63b42ff827618a3acb9bcef69d01f1 (patch)
tree1b68641d402908f8a81e3627cdc6f92033b9db68
parentf700886c55273330a01c38c20365d347b8c10d4a (diff)
Revert "the debian-specific case doesn't work for squeeze, so re-factor the way it is"
This reverts commit d38e7cf64902ff55138e5f85cc7c3b880ea5fb74. Current puppet package in Squeeze does not start by default => no need to special case it.
-rw-r--r--manifests/cron/base.pp46
1 files changed, 22 insertions, 24 deletions
diff --git a/manifests/cron/base.pp b/manifests/cron/base.pp
index 7b40da6..7daa6fb 100644
--- a/manifests/cron/base.pp
+++ b/manifests/cron/base.pp
@@ -1,34 +1,32 @@
# 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,
}
- 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'],
+ 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'],
+ }
}
}
}
}
-