]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
ensure_resource: be more verbose in debug mode
authorMathias Klette <mathias.klette@magicinternet.de>
Fri, 10 Oct 2014 20:54:22 +0000 (22:54 +0200)
committerMathias Klette <mathias.klette@magicinternet.de>
Fri, 10 Oct 2014 20:57:26 +0000 (22:57 +0200)
helps discovering duplication issues, especially when figthing boolean vs. string arguments

lib/puppet/parser/functions/ensure_resource.rb

index 05e5593fc17b4975eeba865978325cd2a1cef0be..1ba6a44782dafb34a7829db5372f0ee70ea330ad 100644 (file)
@@ -36,8 +36,9 @@ ENDOFDOC
   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