-
Notifications
You must be signed in to change notification settings - Fork 0
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
Enable SSL in haproxy.cfg if patroni_restapi_certfile is defined #2
Conversation
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.
What are you checking for?
If you want add the string when patroni_restapi_certfile
is set to true
then use | bool
. If you're checking if the variable is defined at all please use is defined
.
@widhalmt Thx. I want to check if the variable is defined at all. Currently, the variable is defined with I guess I'll take a look at it. |
Hi @widhalmt, we need to check if the variable is defined, but assigned to an empty string "" (?) :-) I'm used to using only
Edit I also tested it with Jinja. I assigned two variables in the playbook:
test.j2:
Output:
That is exactly what I need. Is it wrong to use only |
Only Why not remove the definition in About the So I see these options with their respective outcome
If you see that differently, I'll happily let myself get convinced. |
@widhalmt You're right, it's hard to read, and also, in this way, I can see which role variables are really required or optional. So I commented all unnecessary variables of the REST API of Patroni and changed the condition. |
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.
Looks good to me as far as I can tell.
kostiantyn-nemchenko/ansible-role-patroni#101