It works for me, using this play:

- hosts: localhost
 gather_facts: false
 vars:
   ignore: false
 tasks:
   - name: with var
     assert:
       that:
         - item < 2
     ignore_errors: '{{ignore|bool}}'
     with_items: [1,2,3]

I get the following output (note the 'ignoring' at the end:

ok: [localhost] => (item=1) => {
   "changed": false,
   "item": 1,
   "msg": "All assertions passed"
}
failed: [localhost] (item=2) => {
   "assertion": "item < 2",
   "changed": false,
   "evaluated_to": false,
   "item": 2
}
failed: [localhost] (item=3) => {
   "assertion": "item < 2",
   "changed": false,
   "evaluated_to": false,
   "item": 3
}
...ignoring





-- 
----------
Brian Coca

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7cMQyudCkqH5Vg2fArf9a7xpK4gXcPBerUdOnoAKuMzDw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to