In regard to: Re: [Puppet Users] Re: Getting all variable occurrences from...:

I'll comment in the ticket as well,

I see you have, and you've closed it out.

In Tim Mooney's example, which I think is
the usual case for hiera data, hiera doesn't have an enumeration of all the
'type: client' nodes, nor should it.

What I'm asking for (or at least, about) is indeed somewhat different than
what Alexander was asking for.

I'm a little surprised at the quick dismissal.  It seems reasonable to me
that since at least YAML supports data structures *and* puppet supports
hashes and arrays and nesting of same, one might choose to design the
configuration "namespace" for a particular class to use an actual data
structure in hiera.  I've been watching the list very closely
for several months for any official statement from Puppetlabs folks about
best practices with hiera data, and your statement is really the first
I've seen.

What you've said has a pretty clear implication: don't use nested data
structures in hiera, because they're not going to work in the way that
I think most people would expect them to work -- you can't merge different
sub-keys from different parts of your hierarchy.

In other words, we shouldn't use something like this:

ntp:
  type: 'client'
  servers:
    - 10.1.2.3
    - 10.1.2.4
  allow_query:
    - '10.1.0.0/255.255.0.0'
    - '10.2.0.0/255.255.0.0'
    - '10.3.0.0/255.255.0.0'
    - '2001:4930::/ffff:ffff::'

We should instead use:

ntp_type: 'client'
ntp_servers:
  - 10.1.2.3
  - 10.1.2.4
ntp_allow_query:
  - '10.1.0.0/255.255.0.0'
  - '10.2.0.0/255.255.0.0'
  - '10.3.0.0/255.255.0.0'
  - '2001:4930::/ffff:ffff::'

You could pretty easily write a custom parser function to return the data
structures you want.

Perhaps if I was as adept in ruby as many of the Puppetlabs employees,
that would be pretty easy, but unfortunately I'm not.

I do appreciate the response!  It's really nice to know the thoughts of
the people that are the experts on this.  It helps me to plan the
direction for our environment.

Tim
--
Tim Mooney                                             tim.moo...@ndsu.edu
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, IACC Building                             701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
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