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 hooks
registered.
Basically what I want it to be able to have a dynamic hierarchy for each
node, for managing groups.
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 role somethinganddatabase => error prone.
If I use a wrapper class for each role that encapsulate the settings, when
I change settings, I'm writting Puppet code while I want to do this with
hiera (not the same guys behind).
Well, I still have to think about it.
Any help is welcome.
Le vendredi 2 mai 2014 18:53:57 UTC+2, Felix.Frank a écrit :
>
> 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 subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/683f983f-eba7-491e-9fdb-1fcb54e8917d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.