Hello everybody,

I'm currently writing an openssh module in puppet 4 and wanted to
utilize the module hiera to define the defaults instead of supplying
them directly.

E.g. the openssh::server resource sets the parameter $options to the deep
merged value of a deep-merge lookup of `openssh::server` and
`openssh::server::$ident`.

Now, when supplying the defaults via a module hiera those defaults would
always be merged with what the user set in their environment/classic
hiera - which isn't exactly the goal of defaults.

My first idea was to use a function which looks up the given values from
above and then merges `openssh::server::default` into it to fill any
unset values with the default. However I'd make that as an additional
module with a generalized version to use with other modules, which in
turn would create additional dependencies.

Maybe I'm overthinking this, but I'd love to hear if someone has
a solution for this.

Thanks all,
Cheers,
Nelo

--
/"\  ASCII Ribbon Campaign
\ /  - against HTML emails
 X   - against proprietory attachments
/ \  http://en.wikipedia.org/wiki/ASCII_Ribbon_Campaign

-- 
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/20161121205953.GA25817%40LXKA-2NCPDC2.external.local.
For more options, visit https://groups.google.com/d/optout.

Reply via email to