diff options
Diffstat (limited to 'manifests/puppetmaster/package')
-rw-r--r-- | manifests/puppetmaster/package/base.pp | 6 | ||||
-rw-r--r-- | manifests/puppetmaster/package/debian.pp | 33 |
2 files changed, 32 insertions, 7 deletions
diff --git a/manifests/puppetmaster/package/base.pp b/manifests/puppetmaster/package/base.pp index 363f827..ff8d02a 100644 --- a/manifests/puppetmaster/package/base.pp +++ b/manifests/puppetmaster/package/base.pp @@ -4,7 +4,9 @@ class puppet::puppetmaster::package::base inherits puppet::puppetmaster::package ensure => present, } - Service['puppetmaster']{ - require +> Package['puppetmaster'], + if $puppetmaster_mode != 'passenger' { + Service['puppetmaster']{ + require +> Package['puppetmaster'], + } } } diff --git a/manifests/puppetmaster/package/debian.pp b/manifests/puppetmaster/package/debian.pp index 9d7d397..01b7f79 100644 --- a/manifests/puppetmaster/package/debian.pp +++ b/manifests/puppetmaster/package/debian.pp @@ -1,10 +1,33 @@ class puppet::puppetmaster::package::debian inherits puppet::puppetmaster::package::base { - package { 'puppetmaster-common': - ensure => present, + if !$puppetmaster_ensure_version { + $puppetmaster_ensure_version = 'installed' + case $lsbdistcodename { + wheezy,sid: { + $puppetmaster_common_required = 'puppetmaster-common' + $puppetmaster_common_ensure = $puppetmaster_ensure_version + } + default: { + if (versioncmp($puppetmaster_ensure_version, "2.6.7") >= 0) { + $puppetmaster_common_requred = 'puppetmaster-common' + $puppetmaster_common_ensure = $puppetmaster_ensure_version + } + } + } } - - Package['puppetmaster']{ - require => Package['puppetmaster-common'] + + Package["puppetmaster"]{ + require => $puppetmaster_common_required ? { + '' => undef, + default => Package["$puppetmaster_common_required"] + }, + ensure => $puppetmaster_ensure_version, + } + + package { "puppetmaster-common": + ensure => $puppetmaster_common_required ? { + '' => absent, + default => $puppetmaster_common_ensure + }, } } |