Hello,
I am trying to figure out how to stop further execution of a playbook if only one of the hosts fails. My inventory contains two hosts assigned to the same group, so the playbook runs on both hosts. Considering I am standing up a failover cluster, I want the playbook to stop, and thus not continue on the second, non-failed host.
Here is an excerpt of one of the tasks in my playbook:
- name: configureQuorum
script: configureQuorum.ps1
register: result
ignore_errors: true
failed_when: ( result.rc != 0 )
The failed_when directive doesn’t do the trick. Any ideas?