back to notes

Chef attributes deep merge example

You can access it directly:

Chef::Mixin::DeepMerge.merge(A, B)

chef > recipe_mode
recipe_mode
chef > recipe_mode
chef:recipe > Chef::Mixin::DeepMerge.merge({}, {:a => "1"} )
=> {"a"=>"1"}
chef:recipe >

And I believe the values are merged in the run in a chef-shell so if you define your roles/attribs or launch a run with chef-shell -z you can see the state that the node attribs will merge too.


last updated march 2013