Docs example, does this exist?


#1

In this example:
http://docs.opscode.com/essentials_node_object_deep_merge.html#addition
there’s a method run with parameters.

Does something like this exist in chef-shell, anywhere else, that an
operator could use to test the deep merge with attributes at different
precedence levels, data formats, etc?

-Mike


#2

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.

On Thu, Mar 21, 2013 at 9:53 PM, Mike miketheman@gmail.com wrote:

In this example:
http://docs.opscode.com/essentials_node_object_deep_merge.html#addition
there’s a method run with parameters.

Does something like this exist in chef-shell, anywhere else, that an
operator could use to test the deep merge with attributes at different
precedence levels, data formats, etc?

-Mike


#3

Oooh. Cool. That would definitely be a more interesting example to
show in the docs.

Can I see/play with precedence levels here was well?

On Fri, Mar 22, 2013 at 7:07 AM, Jesse Nelson spheromak@gmail.com wrote:

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.

On Thu, Mar 21, 2013 at 9:53 PM, Mike miketheman@gmail.com wrote:

In this example:
http://docs.opscode.com/essentials_node_object_deep_merge.html#addition
there’s a method run with parameters.

Does something like this exist in chef-shell, anywhere else, that an
operator could use to test the deep merge with attributes at different
precedence levels, data formats, etc?

-Mike