diff options
author | TP Honey <tphoney@users.noreply.github.com> | 2017-07-07 18:00:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-07 18:00:08 +0100 |
commit | 5a17bf1c338c74bd6c8dbacc9a05b4cd501ecc23 (patch) | |
tree | 465af9117753d648cdf4df8bba33baec4c7ad295 /lib | |
parent | 578220e62389af8fd7047da77b00171d45896c85 (diff) | |
parent | 530d2ef184d19b965a4c9db2c415c26b80f9d31b (diff) |
Merge pull request #716 from EmersonPrado/MODULES-4377
(Modules 4377) Causes ensure_packages to accept concurrent declarations with ensure => 'present' and 'installed'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/parser/functions/ensure_packages.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/ensure_packages.rb b/lib/puppet/parser/functions/ensure_packages.rb index 034f997..1bf8bf1 100644 --- a/lib/puppet/parser/functions/ensure_packages.rb +++ b/lib/puppet/parser/functions/ensure_packages.rb @@ -19,6 +19,9 @@ third argument to the ensure_resource() function. if arguments[0].is_a?(Hash) if arguments[1] defaults = { 'ensure' => 'present' }.merge(arguments[1]) + if defaults['ensure'] == 'installed' + defaults['ensure'] = 'present' + end else defaults = { 'ensure' => 'present' } end @@ -30,6 +33,9 @@ third argument to the ensure_resource() function. if arguments[1] defaults = { 'ensure' => 'present' }.merge(arguments[1]) + if defaults['ensure'] == 'installed' + defaults['ensure'] = 'present' + end else defaults = { 'ensure' => 'present' } end |