So… I'm coming across a situation where I foresee myself having a collection of 
related k/v pairs in hiera. I want to create a thing… lets say a yumrepo for 
example's sake, but this same idea translates to  a vhost, a web app 
configuration , a virtual domain, etc.

lets assume a hierarchy of:

  - %{region}/%{dc}/%{env}/%{function}/%{fqdn}
  - %{region}/%{dc}/%{env}/%{function}/common
  - %{region}/%{dc}/%{env}/common
  - %{region}/%{dc}/common
  - %{region}/common

in the us-east region common yaml file, should I create the following two repos 
values:

repo_descr: eastcoast-pub
repo_baseurl: http://myfoo.com/eastcoastgoodtimes
repo_gpgkey: http://myfoo.com/eastcoastgoodtimes/key
repo_gpgcheck: 1
repo_enabled: 1
repo_enablegroups: 0

repo_descr: eastcoast-internal
repo_baseurl: http://myfoo.com/eastcoast
repo_gpgkey: http://myfoo.com/eastcoast/key
repo_gpgcheck: 1
repo_enabled: 1
repo_enablegroups: 0


in the foo DC common file I have a repo for that datacenter:

repo_descr: foo
repo_baseurl: http://myfoo.com/goodtimes
repo_gpgkey: http://myfoo.com/goodtimes/key
repo_gpgcheck: 1
repo_enabled: 1
repo_enablegroups: 0



in the 'qa' env common yaml file

repo_descr: fooqarepo
repo_baseurl: http://myfoo.com/qa_crispybacon/goodtimes
repo_gpgkey: http://myfoo.com/qa_crispybacon/goodtimes/key
repo_gpgcheck: 1
repo_enabled: 1
repo_enablegroups: 0



in the webservers function common yaml file, I have another repo:

repo_descr: webservers
repo_baseurl: http://myfoo.com/bacon/goodtimes
repo_gpgkey: http://myfoo.com/bacon/goodtimes/key
repo_gpgcheck: 1
repo_enabled: 1
repo_enablegroups: 0






so I want all the qa web servers in the foo DC in the east coast to have all 
five of those repo files defined.. except for web02, of course, because he's 
special… looking at it this way makes my head hurt. I don't see a good way to 
actualize these repos onto a node, or exclude them from a unique snowflake if 
necessary, which sort-of defeats the purpose of hiera altogether.

Do I not create them as separate keys, but as a single 'repo' array, and in my 
manifest use a template to iterate through the array and associate the values 
contained within  the array with values needed for the addition of a repo?

What have people found works "best"?





________________________________

This message may contain confidential or privileged information. If you are not 
the intended recipient, please advise us immediately and delete this message. 
See http://www.datapipe.com/legal/email_disclaimer/ for further information on 
confidentiality and the risks of non-secure electronic communication. If you 
cannot access these links, please notify us by reply message and we will send 
the contents to you.

-- 
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