Closed jsmartt closed 8 years ago
It would be an interesting feature to the cookbook.
I don't know if it would be trivial without editing the like?
method from the Ruby SDK, but if you have any idea on how to implement it I totally agree adding it as a Chef::log.debug
output.
I think I can come up with something... :wink:
That would be a nice feature!!!
When updating resources, there is no log output that indicates what is changed; just that it needs updated. However, when trying to debug a resource that continually needs updated because it seems to never match the definition, it's impossible to tell why.
For instance, if you have:
It will always get "updated". On further investigation, it's because
"smartLink"=>false
on OneView, and it can't be set to false. It's pretty easy to output a diff for single-level hashes like ethernet_network data. You could just output:However, for nested hashes, this may prove a little more difficult. We could do a dot chain, which could look something like:
The easiest option would just be to print a debug statement with both complete hashes (no diff), but I think it's worth handling cleaner than that. Thoughts?