-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
Puppetdbquery support for unicast.hosts #849
Comments
Relates to dalen/puppet-puppetdbquery#84 |
Unfortunately I don't think the erb template can be amended to fix that case. The config template uses It does make your use case somewhat difficult to solve, but I can't think of a way to get around what |
Today I created the following solution. All parameters are defined in Hiera except the ones below: my_elasticsearch/manifests/init.pp
my_elasticsearch/lib/puppet/parser/functions/enhance_instances.rb
|
Thanks @pietervogelaar, glad you found a workaround - hopefully this issue can help out someone down the road. |
I would like to search for other hosts of the cluster based on application, role and environment. This is very nicely possible with puppetdbquery.
Hiera yaml:
However the _nodequery puppetdbquery suffix doesn't work inside a deeper hash. So as a workaround I retrieve the hosts array with an extra parameter. With a hiera lookup inside Hiera I retrieve the value. But that hiera lookup always returns a string. This will result in the config file as
discovery.zen.ping.unicast.hosts: "['192.168.50.52', '192.168.50.53']"
instead ofdiscovery.zen.ping.unicast.hosts: ['192.168.50.52', '192.168.50.53']
.Can this be corrected in the erb template?
The text was updated successfully, but these errors were encountered: