# ignore errors

**URL:** <https://forum.ansible.com/t/ignore-errors/11761>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [August 3, 2012, 9:22pm UTC](https://forum.ansible.com/t/ignore-errors/11761 "2012-08-03T21:22:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Time\_Less](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@Time\_Less](https://forum.ansible.com/u/Time_Less)\
**Post date:** [August 3, 2012, 9:22pm UTC](https://forum.ansible.com/t/ignore-errors/11761/1 "2012-08-03T21:22:40Z")

</div>

I am curious about this. It seems the answer would be to create separate playbooks for each item to remove, and run each of them in serial using a wrapper script? Or a playbook wrapping these three playbooks together?

Alternatively, if you wrap the “rpm” command in a shell script that always returns success, would that not work?

---

<div class="post-metadata">

**Author:** ![Curtis](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@Curtis](https://forum.ansible.com/u/Curtis)\
**Post date:** [August 3, 2012, 9:26pm UTC](https://forum.ansible.com/t/ignore-errors/11761/2 "2012-08-03T21:26:53Z")

</div>

For that one I would use the yum module and state=removed.

---

<div class="post-metadata">

**Author:** ![Seth\_Vidal](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@Seth\_Vidal](https://forum.ansible.com/u/Seth_Vidal)\
**Post date:** [August 3, 2012, 9:37pm UTC](https://forum.ansible.com/t/ignore-errors/11761/3 "2012-08-03T21:37:23Z")

</div>

Agreed - if you set state=removed then ansible won't emit an error if the pkg is already absent.

One thing it will do is emit an error if the pkg is nowhere.

ie: you say

yum state=removed pkg=lalal

currently the yum module will say "no package named lalal found anywhere"

which is more or less saying "are you sure you didn't typo that?"

-sv
