Ansible has the yum
module,
We can use it to install a package:
ansible all -m yum -a 'name=vim state=latest'
but how to use it to execute the clean and make cache commands? I only know the script way:
ansible all -m shell -a 'yum clean all'
ansible all -m shell -a 'yum makecache'
So, how to use the yum
module to clean and make cache the yum repo?