-
Notifications
You must be signed in to change notification settings - Fork 289
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
How to make sensu::plugins do an array merge in hiera #387
Comments
Yes you can do it in a class that calls sensu. Have you looked at In a nutshell if you do not use the function hiera_array (automatic parameter lookup) it will use the priority which is what you are seeing...
So in your puppet module you could use this function and then call sensu
You may have to play with hiera deeper merge, though it sounds native might work in your scenario.
The problem with the hiera functions if if the value does not exist it Errors and stop immediately but you can do a default ... which could later be ignored in the define... so it is possible but it is much easier to have a calling class (this may even work in a node definition as the hiera functions can go in the body of puppet) |
I'm going to go ahead and close this as I think it is hiera config rather than an issue with this module and there has been no activity for a few weeks. Let us know if this is incorrect. |
Hi,
I use hiera for pushing plugins using sensu::plugins. However, since the parameter plugins is an array, hiera is not doing a merge of different sensu::plugins declarations at various hierarchy levels.
For example, in my global.yaml I have a common set of plugins defined which have to be pushed to all nodes. I also have some specific plugins that have to be pushed based on the role. With the current configuration hiera is picking up only the role specific plugins.
Is there anyway to write a wrapper class on top of the sensu class to make the plugins do an array merge across hierarchies?
Thanks,
Siva
The text was updated successfully, but these errors were encountered: