diff --git a/manifests/init.pp b/manifests/init.pp index 9f3650e..ae82fd8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -42,6 +42,7 @@ # `Bool` # # State whether or not this puppet module should manage the service. +# This parameter is disregarded when $ensure = absent|purge. # # defaults to: `true` # @@ -138,12 +139,14 @@ $svc_ensure = $service_ensure $svc_enable = $service_ensure ? { 'running' => true, 'stopped' => false } $file_ensure = 'present' + $srv_manage = $manage_service } 'absent', 'purged': { $pkg_ensure = $ensure $svc_ensure = 'stopped' $svc_enable = false $file_ensure = 'absent' + $srv_manage = false } default: { fail("unsupported value of \$ensure: ${ensure}") @@ -154,7 +157,7 @@ ensure => $pkg_ensure, } - if $manage_service { + if $srv_manage { service { $service_name: ensure => $svc_ensure, enable => $svc_enable,