Unable to upgrade the package with latest

27 views
Skip to first unread message

Rayees Namathponnan

unread,
Nov 9, 2016, 1:04:46 PM11/9/16
to Ansible Project
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

Kai Stian Olstad

unread,
Nov 9, 2016, 1:24:41 PM11/9/16
to ansible...@googlegroups.com
On 09. nov. 2016 19:04, Rayees Namathponnan wrote:
> Graylog server is running in my host *version*
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)."

--
Kai Stian Olstad

Rayees Namathponnan

unread,
Nov 9, 2016, 2:10:11 PM11/9/16
to Ansible Project, ansible-pr...@olstad.com
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


Kai Stian Olstad

unread,
Nov 9, 2016, 2:40:24 PM11/9/16
to ansible...@googlegroups.com
On 09. nov. 2016 20:10, Rayees Namathponnan wrote:
> I tried state is present but not updating the rpm, rpm is already in
> local path

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.


--
Kai Stian Olstad
Reply all
Reply to author
Forward
0 new messages