# How to ignore the failed plays, not just failed tasks ?

**URL:** <https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [May 10, 2013, 1:33pm UTC](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789 "2013-05-10T13:33:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [May 10, 2013, 1:33pm UTC](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789/1 "2013-05-10T13:33:29Z")

</div>

The whole play will only fail and abort the run when all hosts in the batch have failed.

(If serial: 10 is set for a rolling update, the batch size is 10, for example, otherwise it’s the size of the group).

---

<div class="post-metadata">

**Author:** ![Lianghwa\_Jou](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@Lianghwa\_Jou](https://forum.ansible.com/u/Lianghwa_Jou)\
**Post date:** [May 10, 2013, 4:33pm UTC](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789/2 "2013-05-10T16:33:38Z")

</div>

That’s actually the problem. Since each play can target different servers, “all hosts” should include hosts in all plays. It should not abort the run because all hosts of ONE play failed. Other plays don’t get a chance to run. For example, I have 2 db servers and 5 web servers and 2 lb servers. Because all the db servers failed (or were shut down already), it aborted the run so none of the web server will be shut down properly.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [May 10, 2013, 4:44pm UTC](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789/3 "2013-05-10T16:44:05Z")

</div>

“That’s actually the problem. Since each play can target different servers, “all hosts” should include hosts in all plays. It should not abort the run because all hosts of ONE play failed.”

I disagree, but in this case you may wish to execute playbooks with multiple ansible-playbook calls.

You may also want to consider just issuing the shutdown against the ‘all’ group, if that was your intent.

---

<div class="post-metadata">

**Author:** ![Lianghwa\_Jou](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@Lianghwa\_Jou](https://forum.ansible.com/u/Lianghwa_Jou)\
**Post date:** [May 10, 2013, 6:45pm UTC](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789/4 "2013-05-10T18:45:13Z")

</div>

1. How do you execute multiple ansible-playbook calls ? Any reference to document or example will be appreciated.
2. We have to shut down different types of hosts in different ways so we cannot use “all” for all plays.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [May 10, 2013, 9:38pm UTC](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789/5 "2013-05-10T21:38:46Z")

</div>

Possibly like so:

ansible-playbook foo.yml; ansible-playbook bar.yml

---

<div class="post-metadata">

**Author:** ![Daniel\_Heffner](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@Daniel\_Heffner](https://forum.ansible.com/u/Daniel_Heffner)\
**Post date:** [February 28, 2018, 8:58pm UTC](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789/6 "2018-02-28T20:58:40Z")

</div>

I’ll probably make my own post because this post is so old, but it is the same topic, so…

Is there a way to avoid aborting the run when all hosts in a serial batch have failed?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 1, 2018, 12:16am UTC](https://forum.ansible.com/t/how-to-ignore-the-failed-plays-not-just-failed-tasks/12789/7 "2018-03-01T00:16:28Z")

</div>

No, that is the 'serial' feature itself, to kill play if all the hosts  
in a batch fail.
