# hard failure or 'checkpoint' type task

**URL:** <https://forum.ansible.com/t/hard-failure-or-checkpoint-type-task/12645>\
**Category:** Ansible Project\
**Created:** [April 8, 2013, 2:12am UTC](https://forum.ansible.com/t/hard-failure-or-checkpoint-type-task/12645 "2013-04-08T02:12:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![willthames](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@willthames](https://forum.ansible.com/u/willthames)\
**Post date:** [April 8, 2013, 2:12am UTC](https://forum.ansible.com/t/hard-failure-or-checkpoint-type-task/12645/1 "2013-04-08T02:12:23Z")

</div>

I’m running a deployment playbook (stop, rollout, start, post-deploy tasks).

There are times when the whole playbook should abort if any tasks fail (e.g. not all hosts stop).

Is there an easy way to achieve this - what’s happening at the moment is the tasks fail on certain hosts and then the playbook continues using only the non-failed hosts.

I thought of two theoretical approaches - a global ‘fail-hard’ setting where any failure just stops the playbook, or a checkpoint task that only succeeds if all hosts are still in play. I’m sure other approaches are valid.

Is there anything that would solve this currently?

Thanks,  
Will

---

<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:** [April 8, 2013, 4:06am UTC](https://forum.ansible.com/t/hard-failure-or-checkpoint-type-task/12645/2 "2013-04-08T04:06:37Z")

</div>

There is already a new feature in 1.2 called “any\_errors\_fatal: True” (an attribute of the play)

I’m fine with there also being an action plugin capable of creating global failures, though currently “fail” will need to fail everything in a play (or a serial batch size) without the any\_errors\_fatal parameter set.

---

<div class="post-metadata">

**Author:** ![willthames](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@willthames](https://forum.ansible.com/u/willthames)\
**Post date:** [April 8, 2013, 4:56am UTC](https://forum.ansible.com/t/hard-failure-or-checkpoint-type-task/12645/3 "2013-04-08T04:56:55Z")

</div>

Awesome, any\_errors\_fatal sounds exactly what I need - I don’t think I need a failure level greater than play.

Thanks!
