'ansible playbook if else if

I have a few output variables. Around 4 different types of error conditions are possible and a single successful condition, which I check using when condition. But it is more of an if else if else if else condition. I don't want to even check the second, third and fourth condition if first condition becomes true and skip to final summary task.

How to implement this.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source