Ask Your Question
0

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

Hi

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.

2) https://puppet.com/docs/puppet/5.4/hi...

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)?

Thanks,

MfG Matthias

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

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

M.Laroche gravatar image

Hi

Sorry, asked and 30 minutes later found:

https://puppet.com/docs/puppet/4.10/h...

Remove dead settings

Remove everything except the :hierarchy setting.

Delete the following settings completely:

:logger
:merge_behavior
:deep_merge_options

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:

https://puppet.com/docs/puppet/5.4/hi...

And question 2 isanswered, too.

https://puppet.com/docs/puppet/5.4/hi...

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

Stats

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

Seen: 35 times

Last updated: Mar 16