-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use elasticsearch_network_host for connection tests if defined #315
Conversation
Thanks for your contribution! The more we can configure, the better. :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean and neat. Thank you.
elasticsearch_network_host
is a string consisting of different entries in a single string. So this will fail if you set more than one entry for it. I'm afraid we need to rework the logic of this variable so we can still have several values and have your change work.
If you want, I can propose a change so the variable will work as a list instead of a string. Then you can fix your PR and we can merge it. |
When looking at the code, this seems to be even more complicated than I thought. What if someone uses macros like |
I opened #317 to work on a larger scale on this. For now I guess the easiest solution would be if you changed your change request and introduced a new variable like Maybe we can come up with a way to automatically fill it depending on I really don't like it but if you have a look at #317 I guess you see why I'm struggling with a clean solution. The reason why I proposed |
Pull request was converted to draft
Well duh, I had a feeling this was too neat of a fix. I agree, |
Note: I have not had a chance to do any extensive testing on this. I changed all the places I found that does connection checks, so it should hopefully be consistent across the role. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work. Even if you missed an occurrence, that's not a problem. Especially since there's more to come. Some connections will be replaced with a module and others should have their own variable (e.g. other roles).
So, approved. Thank you so much.
When
elasticsearch_network_host
is set to something not including localhost, all connection tests fails.This uses
elasticsearch_network_host
for connections if it is defined, and falls back to localhost if not.(There might be more places this change should be made, but the role works for me with this fix)