On 12.07.2019 17:12, S C Rigler wrote:
> Is there any advantage to using the assert module vs the fail module to
> bail out of a play if an expected condition isn't met?

The outcome is the same, but they work opposite way

- fail:
    msg="Hello"
  when: myvar == True

- assert:
    that: myvar == True

If myvar is True the fail will stop the play and the assert will continue the 
play.
And if myvar is False the opposite will happen.

-- 
Kai Stian Olstad

-- 
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/aca6d643-57a4-40aa-cb96-fd2c85975268%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to