Issue #16856 has been updated by Stefan Goethals.

I forgot to put the comments here too, besides the mailinglist.

For completeness i add them now even though the comment about the default file 
naming has already been corrected by Volcane.

Stefan.


Dec 13:
The good news:

Without /etc/puppet/hiera.yaml & Without <module>/data/hiera.yaml = OK!
Without /etc/puppet/hiera.yaml but with empty <module>/data/hiera.yaml = OK!
Without /etc/puppet/hiera.yaml but with <module>/data/hiera.yaml with a 
hierarchy = OK!

With empty /etc/puppet/hiera.yaml & Without <module>/data/hiera.yaml = OK!
With /etc/puppet/hiera.yaml with a hierarch & Without <module>/data/hiera.yaml 
= OK!
With /etc/puppet/hiera.yaml with a hierarch & with empty 
<module>/data/hiera.yaml = OK!
With /etc/puppet/hiera.yaml with a hierarch & with <module>/data/hiera.yaml 
with a hierarchy = OK!

Lookups via hiera() in a define also seem to work well!


Comment:

The default file looked up in the in-module data backend is 'default.yaml', not 
'common.yaml' and
that is different from the yaml backend so it is somewhat confusing.
It is also not what was 'agreed'  in this thread.

All this is based on a simple test with a module with one class and one define 
so it is not very in-depth
but the results are clear and as expected....

Thank you Volcane ! We're getting there. :-)


If anyone is interested, here is the puppet env i used to test this.

https://github.com/zipkid/puppet3-hiera_data_in_module

----------------------------------------
Feature #16856: puppet should support data in modules
https://projects.puppetlabs.com/issues/16856#change-78989

Author: R.I. Pienaar
Status: Needs More Information
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: 
Branch: https://github.com/puppetlabs/puppet/pull/1217


At present there is a way to store data in modules using the puppet backend for 
hiera but it is optional and kind of broken.  The site hierarchy impacts how 
the puppet backend behaves which makes it impossible for module authors to 
supply data in their modules they can rely on

I propose a new hiera backend that loads a hierarchy of data from the 'data' 
directory in the module, this module must always be present in a puppet 
install.  This ability is key to the ability to create configurable forge 
modules that do not have hard coded values thanks to the puppet 3 hiera 
integration

reference the users list thread 
https://groups.google.com/d/topic/puppet-users/pvqzeyHkrY4/discussion


-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to