Unable to upgrade the package with latest

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

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)."

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

`

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.