On Sat, May 31, 2014 at 4:46 PM, Robin Bowes <[email protected]> wrote:

> On Sat, 2014-05-31 at 07:12 -0700, Daniele Sluijters wrote:
> > > - Don't use automatic hiera lookups.  This removes the magic and
> > makes it more clear to everyone that the data is coming from hiera.
> >
> >
> > Hold on a sec; if you mean data bindings with 'automatic hiera
> > lookups', most certainly use them. Do not ever hardcode hiera()
> > functions in parameter lookups in your module as you module can now
> > _only_ work with Hiera and not everyone uses or wants to use hiera.
> > Instead let data bindings take care of it so that everyone can benefit
> > from your code, Hiera, ENC or by explicitly passing data in.
>
> I think the most important thing is to not hardcode hiera() functions in
> modules. That gives the flexibility for the users of the modules to
> either rely on automatic parameter lookup (APL) or explicitly pass in
> the parameters.
>
> My own preference is to use explicit hiera lookups in "profiles" and
> pass in the data to modules. APL is just a bit too magic, in my
> experience, and avoiding it makes it easier to work out where data comes
> from.
>
> R.
>


Yes, this is what I mean.  Don't use or access hiera from with *component*
modules.  You do need to use it from profile modules.  This assumes that
one is using the profile/roles pattern, which seems to be the current best
practice anyway.


❧ Brian Mathis
@orev

-- 
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/CALKwpEx1S4Cx2OA9SKRWH94LxQ3Ash-AYwJXMgrdj5dwPYYKDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to