-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support Hash Lookup Type #2
Comments
I am currently encountering this issue. If the class variable is a hash, hiera-regex does not look for it. Is there going to be a fix for this any time in the near future? |
@cleung2010, hiera-regex supports returning hash values, this ticket is for merging multiple hashed values from more than one matched key. If you are not getting any value returned at all there is likely something wrong with your hierarchy, regex, or this is a different bug. Can you provide more details to reproduce this? |
I am using a module called puppet-consul, and there is a class variable named config_hash: https://github.com/solarkennedy/puppet-consul/blob/master/manifests/init.pp I tried using hiera-regex to fill a key-value pair in that hash like so:
However, the |
It might be also worth mentioning that I have config_hash defined in my default.pp (or site.pp). I only want certain KV pairs from configh_hash to be in hiera so it might be because it is, as you pointed out, not doing the merge. |
Hey @cleung2010 ,
Since you don't control the consul class, you could probably just do the merge in site.pp instead.
|
What if config_hash is in both common.yaml and hostname.regex, then would that be hiera hash merging? I am planning to remove config_hash from my site.pp and have the common KV values of config_hash in common.yaml |
@cleung2010 , |
Alright, mind if I fork to try to work on it and then send you a pull request? |
Not at all, thanks! |
Fixed in #4 |
Currently only the priority lookup type is supported, we should add hash lookup types as well to allow recursive lookups through the hierarchy.
More info on lookup types can be found here
http://docs.puppetlabs.com/hiera/1/custom_backends.html#handling-lookup-types
The text was updated successfully, but these errors were encountered: