Ask Your Question

How to migrate the hiera v3 (global) option :merge_behavior: deeper to hiera v5?

asked 2018-03-16 02:47:58 -0600

M.Laroche gravatar image


1) How can i tell hiera v5 to use the merge behavior deep as global default?

I can tell every lookup() the use {merge => 'deep'} or configure these options in a hiera data file. But i want to set this behavior as global default, like in hiera v1-3 and I didn't find it how to do that.


Have I to configure it in every hiera data file, only where the key matches or it is in one File enough (first or last file in hierarchy)?


MfG Matthias

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-03-16 03:55:46 -0600

M.Laroche gravatar image


Sorry, asked and 30 minutes later found:

Remove dead settings

Remove everything except the :hierarchy setting.

Delete the following settings completely:


These have no equivalent in a version 5 config, and are no longer needed. Delete them if they’re present. If you’d like to learn about how Hiera 5 supports deep hash merging, see Merging data from multiple sources.

Solution under Hiera 5:

And question 2 isanswered, too.

In any Hiera data source, including module data:

  1. Use the lookup_options key to configure merge behavior.

Really any Hiera data source?

MfG Matthias

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-03-16 02:47:58 -0600

Seen: 39 times

Last updated: Mar 16