# Force another host to fail upon task failure?

**URL:** <https://forum.ansible.com/t/force-another-host-to-fail-upon-task-failure/22957>\
**Category:** Ansible Project\
**Created:** [November 4, 2016, 2:50am UTC](https://forum.ansible.com/t/force-another-host-to-fail-upon-task-failure/22957 "2016-11-04T02:50:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cody\_John](https://avatars.discourse-cdn.com/v4/letter/c/8e7dd6/32.png) [@Cody\_John](https://forum.ansible.com/u/Cody_John)\
**Post date:** [November 4, 2016, 2:50am UTC](https://forum.ansible.com/t/force-another-host-to-fail-upon-task-failure/22957/1 "2016-11-04T02:50:04Z")

</div>

I am building a playbook which upgrades firmware on network switches. These switches are deployed in pairs, and the general procedure goes something like this:

1. Remove B switch from service
2. Upgrade/Reboot B switch
3. Failover to B switch and remove A switch from service
4. Upgrade/Reboot A switch
5. Failover to A switch and verify.

Seems pretty straightforward, but there are a _lot_ of tasks that make up those those steps and a lot that can go wrong. If I am doing batches of 10 pairs at a time (for example), and a task fails during step 1 for one of the B switches, I need to also remove the corresponding A switch from the rest of the playbook. Is this possible?
