Hi
This is part of the way how you can implement hiera.
We heavily use the same pattern to avoid duplicate data.
Unluckily there is (yet?) no best practices written down.
Usually we have a pattern that we strictly follow:
- Never set class parameters on module (technical component or library module) level. Only set data on profile classes.
- Only do automatic data binding, using profile class namespace on hiera data, never do explizit lookups in profile classes.
- e.g.:profile::base::usermgmt::users: {}
- nested lookups always use short key names, usually prefixed with company or department or team short name
- e.g. company_ldap_pass
This pattern allows us to strictly separate data which are needed multiple times in hiera.
Using automatic data binding and the name convention on nested lookups, we can easily identify if data is consumed by a class or needed hiera internally.
hth,
Martin
>
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/282b3812-287a-4eb0-a838-591f2c3f925an%40googlegroups.com.