On Thu, Apr 4, 2013 at 10:50 AM, Jeff McCune <j...@puppetlabs.com> wrote:
> On Thu, Apr 4, 2013 at 3:02 AM, Erik Dalén <erik.gustav.da...@gmail.com>wrote: > >> On Thursday 4 April 2013 at 02:39, Matthaus Owens wrote: >> > ======================== >> > ## Hiera 1.2.0 Release Notes ## >> > ======================== >> > # Features >> > >> > Add deep-merge feature to backend lookups >> > >> > - Config option :merge_behavior => :native|:deep|:deeper >> > - Add optional requirement on deep_merge gem to support >> > :deep and :deeper options >> > - Update Yaml backend to use Backend.merge_answer >> > - Update Json backend to use Backend.merge_answer >> >> So if I understood it correctly the difference is when the values are >> unmergeable and :deeper will give the value from the higher (more specific) >> hierarchy level while :deep will instead give the value from the lower >> (less specific) hierarchy level. Correct? >> > > I'm not sure if this merge behavior has anything to do with the hierarchy > levels. > Hrm, no... I'm wrong. The YAML and JSON backends use the same precedence behavior as well: https://github.com/puppetlabs/hiera/blob/1.2.0/lib/hiera/backend/yaml_backend.rb#L49 https://github.com/puppetlabs/hiera/blob/1.2.0/lib/hiera/backend/json_backend.rb#L45 So you're correct, deep will keep the first answer found in the hierarchy if later values are of different types. Deeper will keep the last answer found in the hierarchy if later values are of different types. -Jeff -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.