Skip to content

Commit

Permalink
ensure_resource: be more verbose in debug mode
Browse files Browse the repository at this point in the history
helps discovering duplication issues, especially when figthing boolean vs. string arguments
  • Loading branch information
mklette committed Oct 10, 2014
1 parent 0c0f7e1 commit 0d11bde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/puppet/parser/functions/ensure_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
items.each do |item|
Puppet::Parser::Functions.function(:defined_with_params)
if function_defined_with_params(["#{type}[#{item}]", params])
Puppet.debug("Resource #{type}[#{item}] not created because it already exists")
Puppet.debug("Resource #{type}[#{item}] with params #{params} not created because it already exists")
else
Puppet.debug("Create new resource #{type}[#{item}] with params #{params}")
Puppet::Parser::Functions.function(:create_resources)
function_create_resources([type.capitalize, { item => params }])
end
Expand Down

0 comments on commit 0d11bde

Please sign in to comment.