On Wednesday, September 17, 2014 3:45:15 PM UTC+1, James Cammarata wrote: > > You will need to handle failures and skipping on a per-task basis - that > logic does not exist at the role level. > > As Karl noted, you should not use the fail module in this case. With > Ansible (and just about every other configuration management system out > there now), you define the state of the system as you want it to be, and > Ansible will make the changes required to bring your system to that state. > The fact that the software is already installed means your system is in the > state expected, which is not a failure. >
I used fail module because I cannot find anything else. All I need is to check if something exists and if does skip the rest of role. Currently if I want to skip all the rest 30 tasks I need to repeat 30 lines of: when: something is not defined or exists or whatever ... It would be good to have something really simple like that: abort_role: when: condition is met -- 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/b5c99da3-93b7-4850-898d-f98a55aa0a75%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
