I'm currently writing a ansible playbook with several conditions. I have a uri block with a when condition. The when condition checks if the var is defined and contains 0:
when: (logs_table_exist.stdout == "0") or ("0" in logs_table_old)
Now logs_table_exist
will always have a value but logs_table_old
can also be undefined. This when condition gives no error but it stays on false, even if logs_table_old
is 0.
Does anybody know how to fix this problem?
Thank you