diff options
author | Wilson McCoubrey <wilson@mccoubreys.co.uk> | 2017-03-10 10:25:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-10 10:25:56 +0000 |
commit | 70d071ba6fa3cf611e5dbdc1cba1343255edf978 (patch) | |
tree | f03c3e3cc651564387a015c1fbb81b7332bf1c4c /lib/puppet/parser | |
parent | 305741973e68a820b10a36f1eb642f001874ee5b (diff) | |
parent | 6077460d9b2a6012dee3eb02ae43a9c6060e39be (diff) |
Merge pull request #735 from bulletproofnetworks/master
Should only try to apply the resource if it not defined
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/functions/ensure_packages.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/ensure_packages.rb b/lib/puppet/parser/functions/ensure_packages.rb index 439af1e..6c59b20 100644 --- a/lib/puppet/parser/functions/ensure_packages.rb +++ b/lib/puppet/parser/functions/ensure_packages.rb @@ -37,7 +37,9 @@ third argument to the ensure_resource() function. Puppet::Parser::Functions.function(:ensure_resource) packages.each { |package_name| + if !findresource("Package[#{package_name}]") function_ensure_resource(['package', package_name, defaults ]) + end } end end |