diff options
author | intrigeri <intrigeri@boum.org> | 2012-06-18 22:57:13 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2012-06-18 22:57:13 +0200 |
commit | 02bd3269948f1a3c5a586e581a7fec22da69a2cc (patch) | |
tree | b57cec1e1efee6035222dc21833bc281d7eb919b /manifests | |
parent | 2e4d22ddd948b6d6f1532654e3dea53fa4b9f7d1 (diff) | |
download | puppet-apt-02bd3269948f1a3c5a586e581a7fec22da69a2cc.tar.gz puppet-apt-02bd3269948f1a3c5a586e581a7fec22da69a2cc.tar.bz2 |
Make apt::preferences_snippet support Puppet < 2.7 again, when the 'package' parameter is not set.
Details:
https://labs.riseup.net/code/issues/3467
https://labs.riseup.net/code/issues/3468
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/preferences_snippet.pp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp index e00c4d1..6a8e6bc 100644 --- a/manifests/preferences_snippet.pp +++ b/manifests/preferences_snippet.pp @@ -1,5 +1,5 @@ define apt::preferences_snippet( - $package = $name, + $package = false, $ensure = 'present', $source = '', $release = '', @@ -7,6 +7,11 @@ define apt::preferences_snippet( $priority ) { + $real_package = $package ? { + false => $name, + default => $package, + } + if $custom_preferences == false { fail("Trying to define a preferences_snippet with \$custom_preferences set to false.") } |