如何使用ansible清理apt缓存?

Pra*_*ddy 3 apt ansible ansible-playbook

链接暗示存在一个模块,但我无法实现它。任何解决方案都是预期的。

Xio*_*iov 9

apt模块已更改为支持autoclean但不clean支持. 在此之前,您可以使用command模块

- command: apt-get clean
  become: yes
Run Code Online (Sandbox Code Playgroud)