Take a look at the autoremove parameter in the YUM module that may help https://docs.ansible.com/ansible/latest/modules/yum_module.html or you may have to use the command module
On Sun, May 12, 2019 at 2:31 PM Veera <[email protected]> wrote: > Hi , > > I am looking for an ansible module which supports yum-utils package > commands. > It consists of a command *"package-cleanup**"* which is pretty useful > in cleaning the old kernels. > > package-cleanup --oldkernels --count=2 <= this command will clean up all > old kernels and keep just two(The current one and the previous one) > > > But on search in the Module index of ansible, or under package > management,there is no module for this command "package-cleanup". > > Do anyone uses the ansible modules of commands from yum-utils? Kindly > share the details .. > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/543094cb-3a83-4596-9f5d-ecf516103d1e%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/543094cb-3a83-4596-9f5d-ecf516103d1e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- David Rojas California High School Cross Country and Track [email protected] 949-337-0526 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJY14k5Sqp8Wp7K%3DNi0ySNYT9BgiAp1_owEyYnRMKWtbQo8kMA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
