# yum module not updating package when installing from local file

**URL:** <https://forum.ansible.com/t/yum-module-not-updating-package-when-installing-from-local-file/21689>\
**Category:** Ansible Project\
**Created:** [June 7, 2016, 2:05pm UTC](https://forum.ansible.com/t/yum-module-not-updating-package-when-installing-from-local-file/21689 "2016-06-07T14:05:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shay\_Rybak](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Shay\_Rybak](https://forum.ansible.com/u/Shay_Rybak)\
**Post date:** [June 7, 2016, 2:05pm UTC](https://forum.ansible.com/t/yum-module-not-updating-package-when-installing-from-local-file/21689/1 "2016-06-07T14:05:01Z")

</div>

Hi,

I’m trying to build new versions of my code into rpm’s then pushing them and install with ansible.

All stages up to the yum install work and I have my new version rpm in the local directory.

However when I run the yum command with the package name in the name parameter, the task is mared OK and the old version remains.

to be more clear.

installed package is \<package\_name\>-1.0.0.noarch.rpm

the new package to be installed is \<package\_name\>-1.0.1.noarch.rpm

But it does not install the 1.0.1 version.

When I run yum install \<package\_path\>/\<package\_name\>-1.0.1.noarch.rpm manually from the instance then the package is updated.

Is this a bug or is there some other way to do it which I’m missing.

Thanks

---

<div class="post-metadata">

**Author:** ![Adam\_Morris](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Adam\_Morris](https://forum.ansible.com/u/Adam_Morris)\
**Post date:** [June 7, 2016, 6:02pm UTC](https://forum.ansible.com/t/yum-module-not-updating-package-when-installing-from-local-file/21689/2 "2016-06-07T18:02:13Z")

</div>

If you are just giving the package name (without a version) then the yum module will check if that is installed. It is so no task needs to be performed. If you were using a repository you would find no difference. If you were using a repository and set the state to latest it would update but that is not valid for a local package. Your best bet is to specify the full package name, with version (or use a repository)

---

<div class="post-metadata">

**Author:** ![Shay\_Rybak](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Shay\_Rybak](https://forum.ansible.com/u/Shay_Rybak)\
**Post date:** [June 8, 2016, 7:09am UTC](https://forum.ansible.com/t/yum-module-not-updating-package-when-installing-from-local-file/21689/3 "2016-06-08T07:09:44Z")

</div>

My issue is that even when stating full package name with version it does not update the package.

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [June 10, 2016, 3:03pm UTC](https://forum.ansible.com/t/yum-module-not-updating-package-when-installing-from-local-file/21689/4 "2016-06-10T15:03:40Z")

</div>

It's probably time to show us the playbooks in question. This does  
work for most people, it's  
possible you have made some error.

---

<div class="post-metadata">

**Author:** ![Andrea\_C](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andrea\_C](https://forum.ansible.com/u/Andrea_C)\
**Post date:** [August 30, 2016, 12:36am UTC](https://forum.ansible.com/t/yum-module-not-updating-package-when-installing-from-local-file/21689/5 "2016-08-30T00:36:45Z")

</div>

I’m having this same problem…

What is your output? What’s wierd is that in the output it doesn’t even tell me that my RPM is already installed. It has blank results:  
ok: [10.0.201.83] =\> {“changed”: false, “msg”: “”, “rc”: 0, “results”: }

Anyone have an idea how to fix this??

---

<div class="post-metadata">

**Author:** ![Shay\_Rybak](https://avatars.discourse-cdn.com/v4/letter/s/9fc348/32.png) [@Shay\_Rybak](https://forum.ansible.com/u/Shay_Rybak)\
**Post date:** [August 30, 2016, 2:14pm UTC](https://forum.ansible.com/t/yum-module-not-updating-package-when-installing-from-local-file/21689/6 "2016-08-30T14:14:55Z")

</div>

Hi,

I ended UP abandoning this because as far as I could see the rpm from file is only supported with state exists. you can’t upgrade with it.

I remember I saw the feature request in Ansible forum somewhere but I can’t find where.

---

<div class="post-metadata">

**Author:** ![Andrea\_C](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andrea\_C](https://forum.ansible.com/u/Andrea_C)\
**Post date:** [August 31, 2016, 9:16pm UTC](https://forum.ansible.com/t/yum-module-not-updating-package-when-installing-from-local-file/21689/7 "2016-08-31T21:16:25Z")

</div>

Hmm, that’s too bad. So you’re just using the command module to do it manually?

It seems strange that it doesn’t even say “package is already present.” When I use the zypper module on SLES on the same RPM file, it at least gives me that feedback in the results.
