[Puppet Users] Re: Dynamically assign files to hiera hierarchy

2014-05-26 Thread William Leese
For more dynamic hiera hierarchy behaviors, take a look here and add your vote / any relevant links: https://tickets.puppetlabs.com/browse/HI-257 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving

Re: [Puppet Users] Re: Dynamically assign files to hiera hierarchy

2014-05-05 Thread Felix Frank
On 05/02/2014 09:32 PM, Vincent Miszczak wrote: > If I use a single role for a node(can be achieved by hiera("role") and > %{role}), I have to write 3 roles : app,database,appanddatabase and put > classes in them. Then, when I change the settings for database, I have > to write the changes in every

Re: [Puppet Users] Re: Dynamically assign files to hiera hierarchy

2014-05-02 Thread Vincent Miszczak
Hi, Well I did this in a lab with one node. I used like this : *site.pp:* hiera_hook("roles") hiera_include("classes") so my :hierearchy: looked like: :hierarchy: - roles/appserver - roles/databaseserver - ... - common I suppose the is not enough because subsequent calls will have the hook

Re: [Puppet Users] Re: Dynamically assign files to hiera hierarchy

2014-05-02 Thread Felix Frank
On 05/02/2014 06:43 PM, Vincent Miszczak wrote: > For my example, I have just included hiera_hook("roles") in site.pp to > achieve to behavior I described previously. Uhuh. How is this used? Does it actually affect subsequent hiera() calls? -- You received this message because you are subscribe

[Puppet Users] Re: Dynamically assign files to hiera hierarchy

2014-05-02 Thread Vincent Miszczak
I finally did it my self. For sure I hate Ruby. This custom function will add values from arbitrary keys (must be arrays) at the beginning of "hierarchy" For my example, I have just included hiera_hook("roles") in site.pp to achieve to behavior I described previously. module Puppet::Parser::Fu