# one task failed doesn't break the rest tasks in other roles

**URL:** <https://forum.ansible.com/t/one-task-failed-doesnt-break-the-rest-tasks-in-other-roles/19034>\
**Category:** Ansible Project\
**Created:** [August 17, 2015, 8:22am UTC](https://forum.ansible.com/t/one-task-failed-doesnt-break-the-rest-tasks-in-other-roles/19034 "2015-08-17T08:22:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tzu\_Lao](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Tzu\_Lao](https://forum.ansible.com/u/Tzu_Lao)\
**Post date:** [August 17, 2015, 8:22am UTC](https://forum.ansible.com/t/one-task-failed-doesnt-break-the-rest-tasks-in-other-roles/19034/1 "2015-08-17T08:22:05Z")

</div>

Hi guys,

I have role X with tasks a,b,c,d.  
And I have another role Y with tasks e,f,g,h.  
And I have host Z whcih I want to apply role X and role Y to.

If task b failed, how to let ansible continue to working on the rest task(e, f, g, h) in role Y?  
Task b failed and I don’t want to let ansible run task c and d,  
so “ignore\_errors: yes” is not solution for me.

Thank you for your helping.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [August 17, 2015, 10:04pm UTC](https://forum.ansible.com/t/one-task-failed-doesnt-break-the-rest-tasks-in-other-roles/19034/2 "2015-08-17T22:04:42Z")

</div>

in 2.0 (current devel) you'll have blocks which will allow this:

block:  
&nbsp;&nbsp;&nbsp;- task a  
&nbsp;&nbsp;&nbsp;- task b  
&nbsp;&nbsp;&nbsp;- task c  
&nbsp;&nbsp;&nbsp;- task d  
rescue:  
&nbsp;&nbsp;&nbsp;- debug: msg=skipping rest of block but continuing with play

which will discontinue errors in that set of tasks but will continue  
with rest of the play.

---

<div class="post-metadata">

**Author:** ![Tzu\_Lao](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Tzu\_Lao](https://forum.ansible.com/u/Tzu_Lao)\
**Post date:** [August 18, 2015, 2:28am UTC](https://forum.ansible.com/t/one-task-failed-doesnt-break-the-rest-tasks-in-other-roles/19034/3 "2015-08-18T02:28:39Z")

</div>

Hi Brian,

Thank you for your helping. The new feature solves my problems.

I can’t wait to use ansible v2.

Brian Coca於 2015年8月18日星期二 UTC+8上午6時04分49秒寫道：
