Closed vladgh closed 3 years ago
And how are we supposed to fix it (in a backward compatible way)?
I just did some tests, and I think simply quoting the variable should fix it (tested with Ansible 2.9.13 and 2.10.1):
---
- name: Debug
hosts: all
tasks:
- debug:
msg: "Check is {{ ansible_check_mode }}"
no_log: "{{ not ansible_check_mode }}"
Can you make a PR?
This is also affecting me.
I have PR opened for this, and I have more work stashed, but I didn't have time to finish it. It requires quite a few IFs in order to work on permutations and combinations of specific versions of python/ansible/ansible-lint, and I find it very hard to come up with a clean and elegant solution.
@seocam, were you able to work around this error?
Isn't this fixed in the last version?
@seocam @thiagoferreiraw
@tersmitten, yes it is!
Thank you very much!
https://github.com/Oefenweb/ansible-postfix/blob/123eb6a1be24c31ad0f57cc7f532c2f8681b3c4d/tasks/main.yml#L70
The line above fails on Ansible 2.10.
A simple way to reproduce is with: