Issue #22648 has been updated by Henrik Lindberg.

Status changed from Accepted to In Topic Branch Pending Review
Branch set to https://github.com/puppetlabs/puppet/pull/1957

https://github.com/puppetlabs/puppet/pull/1957

----------------------------------------
Feature #22648: hiera-2 - support nested / "private" hierarchy in a module
https://projects.puppetlabs.com/issues/22648#change-98187

* Author: Henrik Lindberg
* Status: In Topic Branch Pending Review
* Priority: Normal
* Assignee: 
* Category: databinding
* Target version: 
* Affected Puppet version: 
* Keywords: databinding hiera-2 language
* Branch: https://github.com/puppetlabs/puppet/pull/1957
----------------------------------------
Many modules have the need to differentiate on several facts related to 
osfamily, operatingsystem, cpu, cores etc.
Modules may also come with their own facts that are needed in order to 
correctly configure the module.

If these are mixed into the overall composed hierarchy, there is the 
undesirable effect that these must also
be added as categories in the overall binder_config.yaml. 

There is a very simple solution to this - simply allow multiple paths to be 
used in the hiera-2 hiera.yaml for a contribution in a given category.
The typical scenario is that the values represents defaults and they can thus 
be contributed in the common category. Manual override of these
is then up to whoever uses them, and this user can then either set up the same 
elaborate structure, or simply override in the category that they find suitable.

This can be specified in hiera.yaml like this:
<pre>
hierarchy:
    - 
      category: 'common'
      paths:
          - 'data/cores/${operatingsystem}/${cores}
          - 'data/operatingsystem/${operatingsystem}
          - 'data/osfamily/${osfamily}
   -
</pre>

Thus, all values set in the "flattened" subhierarchy are contributed to the 
common category.

Requires issue #22646 to support multiple paths.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to