# how to abort execution upon a single fail on any host

**URL:** <https://forum.ansible.com/t/how-to-abort-execution-upon-a-single-fail-on-any-host/18883>\
**Category:** Ansible Project\
**Created:** [July 29, 2015, 12:49pm UTC](https://forum.ansible.com/t/how-to-abort-execution-upon-a-single-fail-on-any-host/18883 "2015-07-29T12:49:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leon\_Xie](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@Leon\_Xie](https://forum.ansible.com/u/Leon_Xie)\
**Post date:** [July 29, 2015, 12:49pm UTC](https://forum.ansible.com/t/how-to-abort-execution-upon-a-single-fail-on-any-host/18883/1 "2015-07-29T12:49:38Z")

</div>

hi all,

I have the below playbooks:

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [July 29, 2015, 12:54pm UTC](https://forum.ansible.com/t/how-to-abort-execution-upon-a-single-fail-on-any-host/18883/2 "2015-07-29T12:54:28Z")

</div>

​Perhaps ​any\_errors\_fatal: true might help?

(btw Seems undocumented)

---

<div class="post-metadata">

**Author:** ![Leon\_Xie](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@Leon\_Xie](https://forum.ansible.com/u/Leon_Xie)\
**Post date:** [July 29, 2015, 1:15pm UTC](https://forum.ansible.com/t/how-to-abort-execution-upon-a-single-fail-on-any-host/18883/3 "2015-07-29T13:15:15Z")

</div>

thanks a lot for your suggestion.  
I had a try by adding any\_errors\_fatal: true.  
however, it doesn’t work.

---

<div class="post-metadata">

**Author:** ![Leon\_Xie](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@Leon\_Xie](https://forum.ansible.com/u/Leon_Xie)\
**Post date:** [July 29, 2015, 1:39pm UTC](https://forum.ansible.com/t/how-to-abort-execution-upon-a-single-fail-on-any-host/18883/4 "2015-07-29T13:39:21Z")

</div>

my ansible version is as below:

$ ansible-playbook --version  
ansible-playbook 1.9.1  
configured module search path = None

---

<div class="post-metadata">

**Author:** ![Leon\_Xie](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@Leon\_Xie](https://forum.ansible.com/u/Leon_Xie)\
**Post date:** [July 29, 2015, 2:24pm UTC](https://forum.ansible.com/t/how-to-abort-execution-upon-a-single-fail-on-any-host/18883/5 "2015-07-29T14:24:34Z")

</div>

Hi Serge,

your suggestion about any\_errors\_fatal works for the hosts that in a single play.  
if there is another play and one of the hosts in the play is not in the hosts that marked as any\_errors\_fatal, the tasks in this play will also be executed.
