robertdebock / ansible-role-update

Install updates on your system.
https://robertdebock.nl/
Apache License 2.0
49 stars 20 forks source link

apt autoremove #4

Closed ahnooie closed 6 years ago

ahnooie commented 6 years ago

apt autoremove

It might be nice to set the autoremove parameter for apt. http://docs.ansible.com/ansible/latest/apt_module.html

On Ubuntu unless you run apt autoremove periodically the kernel updates will eventually fill up the /boot partition and you'll run out of space. I'm not sure if it's an issue with other distributions.

robertdebock commented 6 years ago

Very useful addition, I'll build it in.

For yum/dnf systems, a system setting ensures a certain amount of kernels is kept, so not applicable. For zypper, pacman and apk systems, I'm not sure.

robertdebock commented 6 years ago

Should be solved with the latest merge. @ahnooie can you verify if this works for you? (Tests look good.)

ahnooie commented 6 years ago

After testing I found autoremove does not run when combined with update, separated the two in PR #6

robertdebock commented 6 years ago

Okay, all build have passed. Please verify again and let me know if this addresses your issue.

Thanks again @ahnooie !

ahnooie commented 6 years ago

This works, thanks!