# Unable to upgrade the package with latest

**URL:** <https://forum.ansible.com/t/unable-to-upgrade-the-package-with-latest/22990>\
**Category:** Ansible Project\
**Created:** [November 9, 2016, 6:04pm UTC](https://forum.ansible.com/t/unable-to-upgrade-the-package-with-latest/22990 "2016-11-09T18:04:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rayees\_Namathponnan](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@Rayees\_Namathponnan](https://forum.ansible.com/u/Rayees_Namathponnan)\
**Post date:** [November 9, 2016, 6:04pm UTC](https://forum.ansible.com/t/unable-to-upgrade-the-package-with-latest/22990/1 "2016-11-09T18:04:46Z")

</div>

Hi All,

Graylog server is running in my host _version_ “graylog-server-2.1.1-3.noarch.rpm”, i am trying to upgrade this to “graylog-server-2.1.2-1.noarch.rpm”

Here is my ansible script

`

- name: Install Graylog server  
yum: name=/tmp/graylog-server-2.1.2-1.noarch.rpm state=latest

`

During upgrade installation failing with below error, but i can see /tmp/graylog-server-2.1.2-1.noarch.rpm

`

TASK [upgrade-graylog : Install Graylog server] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [198.1xx.xxx.xx]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “No Package matching ‘/tmp/graylog-server-2.1.2-1.noarch.rpm’ found available, installed or updated”, “rc”: 0, “results”: }

`

Any help highly appreciated .

Regards,  
Rayees

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 9, 2016, 6:24pm UTC](https://forum.ansible.com/t/unable-to-upgrade-the-package-with-latest/22990/2 "2016-11-09T18:24:10Z")

</div>

When name is local path or a url only state=present is supported.  
From the documentation  
"You can also pass a url or a local path to a rpm file (using state=present)."

---

<div class="post-metadata">

**Author:** ![Rayees\_Namathponnan](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@Rayees\_Namathponnan](https://forum.ansible.com/u/Rayees_Namathponnan)\
**Post date:** [November 9, 2016, 7:10pm UTC](https://forum.ansible.com/t/unable-to-upgrade-the-package-with-latest/22990/3 "2016-11-09T19:10:11Z")

</div>

I tried state is present but not updating the rpm, rpm is already in local path

`

- name: Install Graylog server  
yum: name=/tmp/graylog-server-2.1.2-1.noarch.rpm state=present

`

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 9, 2016, 7:39pm UTC](https://forum.ansible.com/t/unable-to-upgrade-the-package-with-latest/22990/4 "2016-11-09T19:39:50Z")

</div>

Since local path and url doesn't support state latest it's not possible to upgrade with the yum module.

You could use the command module with rpm -U or just create a repository and serve the files with a web server.
