OK, I incorrectly assumed 'autoclean' is the same as 'clean'. The latter is not supported: https://github.com/ansible/ansible/issues/38920 I'll use the 'command' workaround for now.
thx On Sat, 16 Oct 2021 at 23:18, Dick Visser <[email protected]> wrote: > Hii > > On my Debian (11) systems I end up having many deb files in > /var/cache/apt/archives, and I'm trying to get the apt module to clean > those up at the end of a playbook. > But I can't get this to work using the documented options. None of the > below tasks removes the files: > > - name: Removed unused package from the cache > apt: > autoclean: yes > > - name: Remove dependencies that are no longer required > apt: > autoremove: yes > > I have added update_cache to them, but also to no avail. > Any ideas? > > Using > > command: apt-get clean > > does what I want, but that feels like throwing in the towel..... > > > > > > > -- > Dick Visser > Trust & Identity Service Operations Manager > GÉANT > -- Dick Visser Trust & Identity Service Operations Manager GÉANT -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwOXjZHRS3z5yXC23rgB8fQ45qCtdjw3P6-MCSW-KZrWGg%40mail.gmail.com.
