Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing hiera lookup_options #196

Closed
brightdroid opened this issue May 19, 2021 · 5 comments
Closed

missing hiera lookup_options #196

brightdroid opened this issue May 19, 2021 · 5 comments

Comments

@brightdroid
Copy link

Please add merge options, so one can add entries in all hiera layers.

Example:

You have three hiera layers (common, env, node) and you'd like to merge "systemd::loginctl_users" from env and node, it's currently not possible.

Solution

common.yaml:

# ...
lookup_options:
  systemd::loginctl_users:
    merge: deep
# ...

Docs: https://puppet.com/docs/puppet/7.6/hiera_merging.html#setting_lookup_options_to_refine_the_result_of_a_lookup

Thank you

@ekohl
Copy link
Member

ekohl commented May 19, 2021

Can't you specify that in your own Hiera? I'm not sure if modules should be opinionated on it.

@kenyon
Copy link
Member

kenyon commented May 20, 2021

Indeed, you can do this in your own hiera data, like I do in my common.yaml: https://github.com/kenyon/puppet/blob/0f039936c8adccdb8e8b8754a31567ee4bf05cb8/data/common.yaml#L4-L18

@brightdroid
Copy link
Author

Sure, but I thought it might be most people need this too. And it shouldn't harm current installations.

@traylenator
Copy link
Contributor

It may harm current installations if they have three layers common , env, site and they are not expecting a merge.
I think this should be closed as the May 19th suggestion is good.

@smortex smortex closed this as completed Feb 18, 2022
@brightdroid
Copy link
Author

Sure can be closed as I don't use the code anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants