Closed dkrutsko closed 2 years ago
Ansible treats all values in the extra vars as strings. It seems like we're missing some | bool
conversion in some conditions. You may pass your vars as JSON as a workaround for now, ie: -e '{"something": false}'
Describe the bug
There are some variables which, when set to
false
, are actually treated astrue
.To Reproduce
Take the above example, setting
dns_encryption=false
is not honored inipsec.conf
and the variable pretends to betrue
. This results inrightdns
to actually use thelocal_service_ip
rather than the IPs specified withdns_servers
. In a previous version of this file, there was some coercion, which I believe would fix the problem, for this example anyway.Resolution
Either bring back the coercion in the places that need it or just specify in the documentation to leave boolean variables blank if you want it to represent
false
. But I'm not sure which way is best because there's a lot of places which can go either way in the code. So each usage of a boolean variable would need to be evaluated to ensure that it follows the same standard.