HI, no, this doesn't work. You see in you output

...ignoring

This means, that the errors are ignored.
Also the PLAY RECAP shows, that everything is ok, and no tasks failed.
If you add another task after the one already contained, it is still 
executed, but this should no happen...


On Friday, November 3, 2017 at 3:48:25 AM UTC+1, Brian Coca wrote:
>
> 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/21526b39-bf0f-4e93-be5c-f2b30d4cf6ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to