When you give when, changed_when or failed_when a list, the items are ANDed, not ORed.
On Wed, Jul 1, 2015 at 1:31 PM, Tom Paine <[email protected]> wrote: > Having trouble understanding if there's a bug in failed_when, or my > understanding is incorrect - > > a *false* and a *true* are OR'ing in a YAML sequence to *false*: > > Fails (failed when evals to true): > failed_when: > - '"300 OK" not in command_result.stderr' > > > Passes (failed when evals to false): > failed_when: > - command_result.rc != 0 > > Both together pass (failed when evals to false): > failed_when: > - '"300 OK" not in command_result.stderr' > - command_result.rc != 0 > > > Spent an hour going back a forth trying to find a syntax error. > failed_when passes the task when it evaluates to false, I've seen a post > from Michael DeHaan saying sequences are treated like ORs. > > What am I not seeing? > > -- > 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/c8528625-14dc-40dc-b3c7-b10c8b617c0e%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/c8528625-14dc-40dc-b3c7-b10c8b617c0e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Matt Martz @sivel sivel.net -- 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/CAD8N0v98dGifEA_dO2z%3DW9RZHP1M3N78HuHzOieRis28-S%3DA5A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
