From 1e6fd6f54de4c1c487961b77603fc76cad9d2efd Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Mon, 30 Sep 2019 17:33:53 -0500 Subject: [PATCH] Adjust documentation for yum clean to use best practices (#62898) The yum module docs suggested using `shell: yum clean all`, which gives an `ansible-lint` error. Plus, you should use the `command` module unless you need more advanced features than just passing in an arbitrary command. Fixes that problem by using the `command` module in the example instead. --- lib/ansible/modules/packaging/os/yum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py index ef188ed2803..6235893e0bf 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -225,8 +225,8 @@ notes: Use the "yum group list hidden ids" command to see which category of group the group you want to install falls into.' - 'The yum module does not support clearing yum cache in an idempotent way, so it - was decided not to implement it, the only method is to use shell and call the yum - command directly, namely "shell: yum clean all" + was decided not to implement it, the only method is to use command and call the yum + command directly, namely "command: yum clean all" https://github.com/ansible/ansible/pull/31450#issuecomment-352889579' # informational: requirements for nodes requirements: