yum module not updating package when installing from local file

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

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)

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

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.

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??

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.

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.