# How do I get a task to always execute even if the task before it fail?

**URL:** <https://forum.ansible.com/t/how-do-i-get-a-task-to-always-execute-even-if-the-task-before-it-fail/36787>\
**Category:** Ansible Project\
**Created:** [June 29, 2022, 1:25pm UTC](https://forum.ansible.com/t/how-do-i-get-a-task-to-always-execute-even-if-the-task-before-it-fail/36787 "2022-06-29T13:25:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@Jim](https://forum.ansible.com/u/Jim)\
**Post date:** [June 29, 2022, 1:25pm UTC](https://forum.ansible.com/t/how-do-i-get-a-task-to-always-execute-even-if-the-task-before-it-fail/36787/1 "2022-06-29T13:25:15Z")

</div>

I’m new to ansible and want to set my tasks to always run even if the task above it fails. Can someone provide an example or show me how to set it up with my task shown below?

Here is one of my task that I want to set to run:

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [June 29, 2022, 4:58pm UTC](https://forum.ansible.com/t/how-do-i-get-a-task-to-always-execute-even-if-the-task-before-it-fail/36787/2 "2022-06-29T16:58:51Z")

</div>

You mention multiple tasks, but the play only has one. Which is the task above the other?
