You mentioned that a specific role would like a different value, but is
there another logical division between the two configs? Perhaps
per-datacenter, or per-network, or some other differentiator? At a worst
case scenario, per individual node? You could add whatever that
differentiator is to your hiera hierarchy, if it isn't there already, and
keep your more common settings toward the bottom of the hierarchy (perhaps
even in the global/common/default tier) and the exceptions higher up. If
that sounds reasonable, then we could look at your code and see how to
separate the data appropriately.


Rob Nelson
rnels...@gmail.com

On Thu, Nov 3, 2016 at 9:11 AM, Bjørge Solli <bjorge.so...@gmail.com> wrote:

> Hi
>
> Setup: Puppet 4, profiles and roles, hiera
>
> Trying to understand what is the best way to solve this problem:
>
> I have a base-profile that includes default setup of sshd. The
> sshd-profile sets up sane defaults, reads specific setups from hiera and
> uses separate resources to manage each setting in the sshd_config-file. But
> now some other profile would like to have a different default value in one
> of the sshd-settings, resulting in a conflict.
>
> I understand using 'defined()' is discouraged and has it's limitations,
> and those stating this says there are 'plenty of ways to get around this',
> but I could find none.
>
> I am willing to rewrite how I do this entirely if it makes my wish to keep
> working defaults in profiles, with no need to overwrite with hiera unless
> it is system specific.
>
> Any tips, hints, websites, etc. welcome!
>
> Regards,
> Bjørge
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/ms
> gid/puppet-users/3b68e251-eb42-4fab-9409-6c64e607eb25%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAC76iT84yb_aoKyXO-FkMKcmHuuf-wNMbW6HjSTSyxZOmbN%2BFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to