Issue #22646 has been reported by Henrik Lindberg.

----------------------------------------
Feature #22646: Hiera-2 hiera.yaml - use named attributes, set defaults
https://projects.puppetlabs.com/issues/22646

* Author: Henrik Lindberg
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: language
* Target version: 
* Affected Puppet version: 3.3.0
* Keywords: databindings language usability
* Branch: 
----------------------------------------
Currently three entries in a hiera.yaml category specification are needed to 
specify a contribution to to a category. 
For humans it is far easier if all elements have a name (unless being a true 
multiple value attribute).

i.e. you have to write something like:
<pre>
['osfamily', '${osfamily}', 'data/osfamily/${osfamily}']
</pre>

This makes it difficult to add smart defaults, and support a private (nested 
hierarchy). (Separate issues)

Suggests that is done like this:
<pre>
hiera.yaml
---
version: 3    # (since are making changes)
hierarchy:
    - 
      category: 'name'
      paths:
         - 'path 1'
         - 'path 2'
    -
      category: 'name2'
      value: 'some interpolated value'
      path: 'a single path'
</pre>

The element 'datadir' should also be added to enable defaults to refer to this 
location.
When format is change it needs a new version.


-- 
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