Hi list,
I have a small playbook tasks file that is called and run from another main playbook task :
“”“”“”
roles/application/tasks/main.yml :
.
- include: …/…/common/tasks/do_things.yml
.
. - name: next action
shell : echo “move to next action”
.
/common/tasks/do_things.yml :
-
name: do this
shell: echo “do this” >> /root/output.txt creates=/root/output.txt -
name: do that
shell: echo “do that” -
name: and that
shell: echo “and that”
.
.
.
.
etc…
“”“”“”"
Is it possible to stop the execution of the /common/tasks/do_things.yml if a condition is meet and continue to the next action where the playbook was called ? I know I can register a value and use the WHEN: statement under every tasks but I would like to avoid this as I have many tasks in the do_things.yml to include a WHEN statement on all of them…