apt-get autoremove - how to use it and how to check that it is doing what it should ?

Hi all,

I’m trying to create some simple playbooks to manage a few hosts. One of the tasks I’m trying to complete is to autoremove unneeded packages. I’m using Ansible 2.1.0 on Ubuntu 14.04 (control machine and managed hosts).

I started with the following playbook:

`

Hi,

I would use command (or shell) until it’s implemented in apt module.
Here is the feature request issue ticket:
https://github.com/ansible/ansible-modules-core/issues/965

It’s implemented in this role.

Thanks,

Is there any way to supress the error on this particular play until then ?

Thanks - I’m trying to avoid pulling in an entire role if I can help it, so the shell play looks simpler for now.