-
Notifications
You must be signed in to change notification settings - Fork 130
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
fix: dont use Yum/Rpm task when packages are already installed #226
Conversation
3f5c9a7
to
b41c938
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This basically bypasses the real functionality of ansible.builtin.package
. Rather than have a hacky workaround, we should probably switch to ansible.builtin.yum
directly. This would allow tweaking the offline behavior with controlling the metadata update flags.
Agreed, but there is no need to switch to the yum module, the package module is actually just a proxy on top of the yum module, which means you can pass any of the yum module parameters to the package module |
While testing, I had set the cacheonly parameter to true, but then it complained that the cache was empty, and the task would still fail... |
b41c938
to
d10c9fb
Compare
Signed-off-by: Albert van der Land <albertvanderland@gmail.com>
d10c9fb
to
ccf4e04
Compare
It seems that the |
I do think the previous commit b41c938 is a better solution though... we shouldnt even have to run yum commands if the package is already installed |
IMO this is a bug in Ansible's package module. It should not need to update caches or activate yum with We have this issue with every role, they all depend on selinux. Not just node_exporter. |
created new issue: ansible/ansible#81847 |
Docs Build 📝This PR is closed and any previously published docsite has been unpublished. |
This should fix issue #225