how to abort task execution for other hosts if one task fails for one host

9 views
Skip to first unread message

Leon Xie

unread,
Aug 18, 2015, 4:50:22 AM8/18/15
to Ansible Project
hi all,

I have the below ansible playbook

++++++++++++++++++++++++++++++++++++++++++++++
- name: do task for AA
  hosts: AA
  roles:
    - AA_ROLE

- name: do task for BB
  hosts: BB
  roles:
    - BB_ROLE
++++++++++++++++++++++++++++++++++++++++++++++

Currently even if one task in AA_ROLE for AA fails, the tasks in BB_ROLE for BB will also be run.

what I want is that if any task in AA_ROLE fails, the tasks in BB_ROLE won't be executed.

is there any method to achieve this?

thanks a lot in advance.
Reply all
Reply to author
Forward
0 new messages