Hi,
I already opened an issue for my question but I was advised to come here
first.
The detailed description is available under
https://github.com/ansible/ansible/issues/32384
To sum it up:
I cannot manage to make the `ignore_errors` work with a variable.
When I use a hardcoded boolean it works, but when I use a boolean variable
it always evaluated to true (ignore errors)
- hosts: 127.0.0.1
vars:
ignore_assertion_errors: false
tasks:
- name: With variable
assert:
that: item < 2
msg: "{{item}} isn't < 2"
ignore_errors: ignore_assertion_errors
with_items:
- 1
- 2
- name: With 'false' as hardcoded boolean
assert:
that: item < 2
msg: "{{item}} isn't < 2"
ignore_errors: false
with_items:
- 1
- 2
I already tried out the following constructs
ignore_errors: "{{ignore_assertion_errors}}"
ignore_errors: ignore_assertion_errors
ignore_errors: "{{ignore_assertion_errors|bool}}"
ignore_errors: ignore_assertion_errors|bool
But always with the same result: the errors of the first task are always
ignored.
Can anybody explain what I'm doing wrong, because from my current point
of view this is an error.
cheers
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2f5b1484-b6d4-4f72-95a7-8932d401667b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.