I've been researching this for a few days and I've reached a level of
desperation sufficient to post.
We want to clean up our somewhat baroque Hiera structure and we've come up
with a beautiful solution -- assigning multiple roles per host.
Our hierarchy would look something like this, more or less:
- roles/%{role}
- datacenters/%{datacenter}/%{cluster}
- datacenters/%{datacenter}
- default
The idea is to use facter_dot_d from stdlib and assign roles on hosts like
this:
---
role:
- hadoop-datanode
- hadoop-namenode
Issue number one, facter not supporting arrays, can be overcome with
switching to a 'roles' fact and splitting it into a role array, either with
a function or with puppet's built in split.
---
roles: hadoop-datanode,hadoop-namenode
Issue number two, however, is bigger: hiera doesn't allow a level in
hierarchy to be an array. We don't really want to do %{role1}, %{role2} ..
%{role42}. Is there no non-kludgy solution for this?
I found https://github.com/puppetlabs/hiera/pull/48 which looks exactly
like what we need, but the commit has been rejected (which made me very
sad).
--
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/-/KQVNDuCffIYJ.
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-users?hl=en.