Hiera merging defaulting to native
elijahsgh opened this issue · 4 comments
Configuration exists in several yaml files that I would like to merge together.
When using hiera.yaml with merge_behavior: deeper the expected behavior happens.
If I move merge_behavior: deeper out of the top level hiera.yaml and into the module's data/hiera.yaml the behavior defaults to native merging. I would like my module to be independent of global configuration and be able to function with the merge_behavior specified within the module.
I have put together a sort of hacky fix that loads the module's merged config and then replaces it before the key is returned here: elijahsgh@8e30018
I'm not sure that is the ideal way to go about changing Hiera's merge_behavior to deeper.
hiera just doesnt support this today. Seems hiera is being rewritten for puppet 4 by puppet labs to be able to do this - so that they can achieve other goals.
For today you just cant do it :(
Your solution is likely to break badly on multi threaded ruby web servers :)
Yea, the Hiera::Config.load approach seems pretty terrible.
I guess the only other approach if I wanted this now would be to re-implement deeper merge within module_data?
yeah i guess, but I doubt I'd merge that :)
Understood. 👍