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
Add 'yum clean' option #31450
Add 'yum clean' option #31450
Conversation
The test
|
This was discussed during today's Ansible Core development community irc meeting and the consensus was that since this operation can not be done in an idempotent way, it does not add any value to the module but does add to the maintenance burden of the module. Ultimately for this kind of functionality, the |
: TASK [geerlingguy.packer-rhel : Clean up yum.] ********************************* : [WARNING]: Consider using yum module rather than running yum To suppress this warning, a workaround can be applied via a notification handler as per documentation[1]. Reasoning for s/workaround/hack/ can be found in [2]'s last comment. [1] https://docs.ansible.com/ansible/2.4/yum_repository_module.html [2] ansible/ansible#31450
: TASK [geerlingguy.packer-rhel : Clean up yum.] ********************************* : [WARNING]: Consider using yum module rather than running yum To suppress this warning, a workaround can be applied via a notification handler as per documentation[1]. Reasoning for specific s/workaround/hack/ can be found in the last comment of PR[2]. [1] https://docs.ansible.com/ansible/2.4/yum_repository_module.html [2] ansible/ansible#31450
Since when is any yum command idempotent or since when this is a requirement to implement only idempotent operations in modules? This argument is silly at the very least. |
adding explanation why you must use "shell: yum clean all" and why it won't be included in the yum module as per ansible#31450 (comment) +label: docsite_pr
add explanation why you must use "shell: yum clean all" and why it won't be included in the yum module as per ansible#31450 (comment)
Can we suppress the warning then? ;) |
add explanation why you must use "shell: yum clean all" and why it won't be included in the yum module as per ansible#31450 (comment)
add explanation why you must use "shell: yum clean all" and why it won't be included in the yum module as per ansible#31450 (comment)
SUMMARY
This patch adds the option "clean" to the yum module
ISSUE TYPE
COMPONENT NAME
yum
ANSIBLE VERSION
latest git
ADDITIONAL INFORMATION
yum has the option to clean caches with
yum clean <option>
Valid options:
[headers|packages|metadata|dbcache|plugins|expire-cache|all]