I am working with puppet 3.0 and have the opportunity to build the hiera 
hierarchy from scratch.  I am pondering which data should be included in 
hiera and how it should be organized.  After some research it appears that 
most folks struggle when their data is dependent on multiple facts rather 
than a strict hierarchical data structure.  For example: a value depends on 
the node location *and *what environment it is in dev|test|qa|prod.

In my mind a hiera hierarchy like the following which is based on network 
location of a node would work great because each level is more specific and 
a subset of the previous making overrides very clear and clean.

   - fqdn - for node specific overrides
   - cluster - cluster specific overrides
   - network - all clusters are isolated on a network segment.
   - common - the default
   
Now the difficult part is that I also want to externalize data in to hiera 
based on the network location *and *the environment.   This becomes more 
complex if a third variable is added.

So the question is: Is there a best practice for handling hiera data values 
based on multiple attributes?  In this case location *and *environment.  
One doesn't take precedence over the other but both are needed to find a 
unique and correct value.


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/XIQXwB5aBiwJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to