summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorJerome Charaoui <jcharaoui@cmaisonneuve.qc.ca>2014-02-20 14:17:56 -0500
committerroot <admin@cmaisonneuve.qc.ca>2014-02-20 14:17:56 -0500
commit36f525a8f36d0c7561ffadbfa53dab00ebf556a7 (patch)
tree414f60cd1800b7a98d27277fcfbb89fe199f794a /manifests
parentbb15f08833ab3c14b6748ef49f3532f0440670fe (diff)
Don't deploy apt_preferences snippet on master if is undef
Diffstat (limited to 'manifests')
-rw-r--r--manifests/puppetmaster/passenger.pp16
1 files changed, 11 insertions, 5 deletions
diff --git a/manifests/puppetmaster/passenger.pp b/manifests/puppetmaster/passenger.pp
index c03d22b..ba71141 100644
--- a/manifests/puppetmaster/passenger.pp
+++ b/manifests/puppetmaster/passenger.pp
@@ -19,13 +19,19 @@ class puppet::puppetmaster::passenger inherits puppet::puppetmaster::base {
include apt
+ $puppet_passenger_snippet = $puppetmaster_ensure_version ? {
+ undef => absent,
+ default => present,
+ }
+
apt::preferences_snippet {
'puppet_passenger':
- package => 'puppet*',
- pin => "version $puppetmaster_ensure_version",
- priority => 2000,
- notify => Exec['refresh_apt'],
- before => Package['puppetmaster'];
+ ensure => $puppet_passenger_snippet,
+ package => 'puppet*',
+ pin => "version $puppetmaster_ensure_version",
+ priority => 2000,
+ notify => Exec['refresh_apt'],
+ before => Package['puppetmaster'];
}
}
default: {