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.
Hi,