我用ansible维护了很多EC2服务器。使用apt模块定期更新和升级服务器。
当我手动尝试升级服务器时,收到以下消息:
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.13.0-29 linux-headers-3.13.0-29-generic
linux-headers-3.13.0-32 linux-headers-3.13.0-32-generic
linux-image-3.13.0-29-generic linux-image-3.13.0-32-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
有没有办法sudo apt-get autoremove
与ansible 一起跑步?
command
模块执行原始shell命令。