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

update hiera_xxx() to lookup() for hiera v5 #65

Closed
7yl4r opened this issue Jun 12, 2017 · 4 comments
Closed

update hiera_xxx() to lookup() for hiera v5 #65

7yl4r opened this issue Jun 12, 2017 · 4 comments

Comments

@7yl4r
Copy link

7yl4r commented Jun 12, 2017

Using hiera 5 requires using the lookup function in place of hiera_xxx() functions. (hiera lookup docs).

Without updating this, deep merging using hiera 5 is impossible with this module, but updating will break compatibility with hiera 3.

@7yl4r
Copy link
Author

7yl4r commented Jun 22, 2017

More specifically:

-  $_outputs = hiera_hash('telegraf::outputs', $outputs)
-  $_inputs = hiera_hash('telegraf::inputs', $inputs)

+  $_outputs = lookup({
+      name          => 'telegraf::outputs',
+      default_value => $outputs,
+  })
+  $_inputs = lookup({
+      name          => 'telegraf::inputs',
+      default_value => $inputs,
+   })

@jschaeff
Copy link

jschaeff commented Sep 4, 2017

You can get this behaviour by adding the variable in your lookup_options;

--- # common.yaml
lookup_options:
  telegraf::inputs:
    merge:
      strategy: deep
      merge_hash_arrays: true

@trunet
Copy link

trunet commented Sep 10, 2017

You can get this behaviour by adding the variable in your lookup_options;

hiera_hash is deprecated... lookup function needs to be used, doesn't matter the merge strategy

@yankcrime
Copy link
Member

Fixed via #82.

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

4 participants