-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
yum_versionlock not idempotent when version provided #4470
Comments
Files identified in the description: If these files are incorrect, please update the |
See ansible-collections/community.general#4470 for details about the bug. Previously, holding back the version of the community.general collection to version 3.2 prevented the bug from impacting us, but now this version can no longer be installed. Since the bug only impacts idempotency, we decided to switch to the most recent version of community.general and mark all yum_versionlock tasks as non_idempotent.
Files identified in the description: If these files are incorrect, please update the |
any news on this? |
There has been no functional change to this module since April 2022, so I guess this hasn't been fixed. There are no active maintainers for it, so if someone wants to contribute a fix, that's definitely welcome! |
Hey, just added PR #6861 which should care about version suffixes, now. Please give it a try and let me know if it works for you. Now, it should be able to handle the plain package name, as well as the package name including its version as a suffix properly. Cheers, |
While looking at the PR I noticed that the module never mentions that passing a version is actually allowed input. So from that point of view, this isn't a bug, but a feature request. That this worked in an earlier version of the module was a random coincidence, also in community.general 3.2.0 the documentation and examples didn't mention that providing a version is supported (see https://github.com/ansible-collections/community.general/blob/3.2.0/plugins/modules/packaging/os/yum_versionlock.py for the code from that version, which includes the documentation and the examples). |
Fair enough, I've just adjusted the PR. This should fit and cover this, now. |
Summary
When I specify that
yum_versionlock
ensures that a package is locked to a specific version, and the package is already locked to that version.yum_versionlock
reports a state change, even thoughyum versionlock list
shows no change. This appears to be a regression, because if I revert back tocommunity.general
version 3.2,yum_versionlock
doesn't report a state change.Here's an example task.
Issue Type
Bug Report
Component Name
yum_versionlock
Ansible Version
Community.general Version
Configuration
OS / Environment
Ansible control node is running either CentOS 7 or Ubuntu 20.04. The managed node is running CentOS 7.
Steps to Reproduce
Expected Results
I expect
yum_versionlock
to respond withok
.Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: