# Bug found in yum module (and the fix)

**URL:** <https://forum.ansible.com/t/bug-found-in-yum-module-and-the-fix/16199>\
**Category:** Ansible Developer\
**Created:** [September 12, 2014, 4:36pm UTC](https://forum.ansible.com/t/bug-found-in-yum-module-and-the-fix/16199 "2014-09-12T16:36:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbasleeper2](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@bbasleeper2](https://forum.ansible.com/u/bbasleeper2)\
**Post date:** [September 12, 2014, 4:36pm UTC](https://forum.ansible.com/t/bug-found-in-yum-module-and-the-fix/16199/1 "2014-09-12T16:36:08Z")

</div>

I just faced an incredible bug in yum module.

When you use state=latest with an enablerepo directive AND yum-utils package is not installed on target server, yum will not update any packages saying everything is up to date.

I spent at least 2 hours looking at the code and trying. All this to finally find a typo in the code. Since i was on a pretty old version of ansible, i checked on devel branch on github and the typo is still there. So surprising this case has not been discovered so far.

Here is the fix : [GH8988](https://github.com/ansible/ansible/pull/8988)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [September 12, 2014, 7:43pm UTC](https://forum.ansible.com/t/bug-found-in-yum-module-and-the-fix/16199/2 "2014-09-12T19:43:35Z")

</div>

That’s amusing.

Ultimately the yum module has two paths to account for reposync being missing – I think the reason most don’t encounter it is because reposync is almost always there.

We used to have this discussion a lot in the past - Seth wanted one code path, I wanted to make sure it worked in the non-reposync case as well.

Regardless, we’ll merge this - I appreciate your fix.
