diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2014-02-20 14:17:56 -0500 |
---|---|---|
committer | root <admin@cmaisonneuve.qc.ca> | 2014-02-20 14:17:56 -0500 |
commit | 36f525a8f36d0c7561ffadbfa53dab00ebf556a7 (patch) | |
tree | 414f60cd1800b7a98d27277fcfbb89fe199f794a /manifests | |
parent | bb15f08833ab3c14b6748ef49f3532f0440670fe (diff) |
Don't deploy apt_preferences snippet on master if is undef
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/puppetmaster/passenger.pp | 16 |
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: { |