Hi Andy,

When trying to implement something like Craig Dunn's roles and profiles
pattern with hiera I ended up with:

:hierarchy:
  - %{hostname}
  - roles/%{role}
  - profiles/%{software1}
  - profiles/%{software2}
  - profiles/%{software3}
  - profiles/%{software4}
  - profiles/%{software5}
  - common

so that I could specify multiple profiles for each role using custom facts
- for example:

  system::fact { 'software': [ 'tomcat','activemq'] }

What I'd really like to be able to match a regex like:

  - profiles/%{software\d+}

having the elements in the hierarchy treated as a regex before they're
evaluated as a string.

  - Keith



On 20 March 2013 22:37, Andy Parker <a...@puppetlabs.com> wrote:

> On Tue, Mar 19, 2013 at 2:30 PM, Larry Fast <lfast1...@gmail.com> wrote:
>
>> My Hiera tree is turning into a chaotic mess. I'm guessing that my tree
>> structure is one problem source. So I'm wondering how other real users have
>> setup hiera.  Here are the core problems that are giving me headaches.
>
>
> I'd be interested in seeing some of these as well. I'm looking for real
> world examples of what people are putting in their hierarchies that we
> might be able to make better in a hiera 2, which is something that my team
> is looking at working on.
>
>
>> # I need to version control my modules separately but hiera data is
>> monolithic.  If I need to change anything anywhere, I need to release a new
>> version of the whole tree.
>>
>
> Would you like to version the data with the modules, or would you want
> something else?
>
>
>> # I can't easily review the final output from hiera within puppet because
>> the traversal is dependent on facts. I need to feed the facts into Hiera
>> before I get anything meaningful.
>>
>
> yeah. As long as the data and hierarchy can be dependent on facts, I don't
> see any way around that.
>
>
>> # Can't easily compare the config of two different servers. (really the
>> same as the previous)
>>
>> Here's my Hiera tree.  I'm very interested to know how others deal with
>> these issues.  Does Puppet Enterprise include Hiera mgmt tools?
>>     - %{environment}/%{project}/%{server_env}/%{module_name}
>>     - %{environment}/%{project}/%{server_env}/common
>>     - %{environment}/%{project}/%{role_name}-role/%{module_name}
>>     - %{environment}/%{project}/%{role_name}-role/common
>>     - %{environment}/%{project}/%{module_name}
>>     - %{environment}/%{location}/%{module_name}
>>     - %{environment}/%{module_name}
>>     - %{environment}/common
>>
>>
> PE doesn't include any tools for managing hiera, unfortunately. Are you
> only using the YAML backend? Or are you using anything else?
>
>
>> NOTES:
>> Each Environment is a copy of our git repo and includes the hiera tree.
>> Project, Server_env, Role_name & Location are custom facts
>>
>  --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to puppet-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to puppet-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to