# ignore errors

**URL:** <https://forum.ansible.com/t/ignore-errors/11723>\
**Category:** Ansible Project\
**Created:** [July 25, 2012, 1:49pm UTC](https://forum.ansible.com/t/ignore-errors/11723 "2012-07-25T13:49:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cosmin\_Luta](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@Cosmin\_Luta](https://forum.ansible.com/u/Cosmin_Luta)\
**Post date:** [July 25, 2012, 1:49pm UTC](https://forum.ansible.com/t/ignore-errors/11723/1 "2012-07-25T13:49:24Z")

</div>

Try:

action: shell rpm -e $item --nodeps ; /bin/true

Not tested.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 25, 2012, 1:55pm UTC](https://forum.ansible.com/t/ignore-errors/11723/2 "2012-07-25T13:55:13Z")

</div>

Better yet, yum module with state=absent

– Michael

---

<div class="post-metadata">

**Author:** ![paweu](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@paweu](https://forum.ansible.com/u/paweu)\
**Post date:** [July 25, 2012, 1:58pm UTC](https://forum.ansible.com/t/ignore-errors/11723/3 "2012-07-25T13:58:10Z")

</div>

Works, Thank You 🙂

W dniu środa, 25 lipca 2012 15:49:24 UTC+2 użytkownik Cosmin Luță napisał:

---

<div class="post-metadata">

**Author:** ![paweu](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@paweu](https://forum.ansible.com/u/paweu)\
**Post date:** [July 25, 2012, 2:00pm UTC](https://forum.ansible.com/t/ignore-errors/11723/4 "2012-07-25T14:00:13Z")

</div>

I cannnot see “absent” in documentation. Does it remove packages without dependencies?

W dniu środa, 25 lipca 2012 15:55:13 UTC+2 użytkownik Michael DeHaan napisał:

---

<div class="post-metadata">

**Author:** ![CWS](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@CWS](https://forum.ansible.com/u/CWS)\
**Post date:** [July 25, 2012, 2:02pm UTC](https://forum.ansible.com/t/ignore-errors/11723/5 "2012-07-25T14:02:11Z")

</div>

[http://ansible.github.com/modules.html#yum](http://ansible.github.com/modules.html#yum)

ansible is an alias for 'removed'. If it's installed, it will remove  
it. If it's not installed, it will do nothing.

---

<div class="post-metadata">

**Author:** ![paweu](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@paweu](https://forum.ansible.com/u/paweu)\
**Post date:** [July 25, 2012, 2:05pm UTC](https://forum.ansible.com/t/ignore-errors/11723/6 "2012-07-25T14:05:16Z")

</div>

Yum module with state=removed removes packages with depencies and I would like to remove them without dependencies.

W dniu środa, 25 lipca 2012 16:02:11 UTC+2 użytkownik \_ napisał:

---

<div class="post-metadata">

**Author:** ![CWS](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@CWS](https://forum.ansible.com/u/CWS)\
**Post date:** [July 25, 2012, 2:09pm UTC](https://forum.ansible.com/t/ignore-errors/11723/7 "2012-07-25T14:09:07Z")

</div>

I'm going to make an assumption here that it removes \*automatically  
installed\* dependencies. I don't see a reason for it not to do that.  
If you want to keep some other package that is a potential dependency  
of the ones you're removing, why not flag those for state=installed?

---

<div class="post-metadata">

**Author:** ![paweu](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@paweu](https://forum.ansible.com/u/paweu)\
**Post date:** [July 25, 2012, 2:14pm UTC](https://forum.ansible.com/t/ignore-errors/11723/8 "2012-07-25T14:14:05Z")

</div>

Because there is a lot of them (\> 30).

W dniu środa, 25 lipca 2012 16:09:07 UTC+2 użytkownik \_ napisał:

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 25, 2012, 2:46pm UTC](https://forum.ansible.com/t/ignore-errors/11723/9 "2012-07-25T14:46:07Z")

</div>

Tip -- don't make assumptions, verify them first 🙂

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 25, 2012, 2:47pm UTC](https://forum.ansible.com/t/ignore-errors/11723/10 "2012-07-25T14:47:37Z")

</div>

Every module that does this should support absent/present, as does  
yum, the other should be treated as an alias. Online docs need to be  
tweaked to be consistent with other modules, definitely.

---

<div class="post-metadata">

**Author:** ![paweu](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@paweu](https://forum.ansible.com/u/paweu)\
**Post date:** [July 25, 2012, 3:04pm UTC](https://forum.ansible.com/t/ignore-errors/11723/11 "2012-07-25T15:04:24Z")

</div>

Is there any possibility that yum module will support removing packages withour dependencies?

W dniu środa, 25 lipca 2012 16:47:37 UTC+2 użytkownik Michael DeHaan napisał:

---

<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:** [July 25, 2012, 3:22pm UTC](https://forum.ansible.com/t/ignore-errors/11723/12 "2012-07-25T15:22:49Z")

</div>

okay - you need to explain your terms a bit better:

A package's dependencies are the other pkgs it depends \_on\_

Dependencies on a package are other pkgs that depend on \_it\_

What you want is for yum to remove a package and not remove the packages which depend on it.

that's called nodeps and that's NEVER going to happen in yum

we even wrote a webpage about it:

[http://yum.baseurl.org/wiki/NoDeps](http://yum.baseurl.org/wiki/NoDeps)

also - by running rpm -e --nodeps like you've done -you've just about guaranteed that any support you seek for that system will be immediately blamed on the --nodeps removal.

-sv

---

<div class="post-metadata">

**Author:** ![paweu](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@paweu](https://forum.ansible.com/u/paweu)\
**Post date:** [July 25, 2012, 7:03pm UTC](https://forum.ansible.com/t/ignore-errors/11723/13 "2012-07-25T19:03:20Z")

</div>

Thats ok, I just need some packages and don’t need some other packages.

Will there be any functionality to skip errors or I need to stick with /bin/true?

W dniu środa, 25 lipca 2012 17:22:49 UTC+2 użytkownik [skv...@fedoraproject.org](mailto:skv...@fedoraproject.org) napisał:

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 25, 2012, 7:09pm UTC](https://forum.ansible.com/t/ignore-errors/11723/14 "2012-07-25T19:09:28Z")

</div>

/bin/true for now.

We should mention it in the web docs.
