Issue #22646 has been updated by Henrik Lindberg. Status changed from Accepted to In Topic Branch Pending Review
---------------------------------------- Feature #22646: Hiera-2 hiera.yaml/binder_config.yaml - use named attributes, set defaults https://projects.puppetlabs.com/issues/22646#change-98185 * Author: Henrik Lindberg * Status: In Topic Branch Pending Review * Priority: Normal * Assignee: * Category: databinding * Target version: * Affected Puppet version: 3.3.0 * Keywords: databindings language usability * Branch: https://github.com/puppetlabs/puppet/pull/1957 ---------------------------------------- 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. The same type of change should be made to binder_config.yaml to make it look like this: <pre> --- version: 2 layers: - name: 'site' include: - 'confdir-hiera:/' - 'confdir:/default?optional' - name: 'modules' include: - 'module-hiera:/*/' - 'module:/*::default' exclude: - 'module-hiera:/bad_boy/*' categories: - name: 'node' value: '${fqdn}' - name: 'operatingsystem' value: '${operatingsystem}' - name: 'osfamily' value: '${osfamily}' - name: 'environment' value: '${environment}' - name: 'common' value: true </pre> Also see #22647 regarding smart default values. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
