autoremove apt packages after upgrades
All checks were successful
/ build (pull_request) Successful in 30s
/ Ansible Lint (pull_request) Successful in 2m37s
/ cleanup-staging (pull_request) Successful in 23s
/ build (push) Successful in 32s
/ Ansible Lint (push) Successful in 2m31s

This commit is contained in:
Max 2026-10-31 16:27:16 +01:00
commit c28d7706a3
Signed by: max
SSH key fingerprint: SHA256:yZMpYLEULscoVYQvcuxhc3eWa6nymBFWCxjsRErAIY8
2 changed files with 5 additions and 1 deletions

View file

@ -1,6 +1,6 @@
# Role `apt_update_and_upgrade` # Role `apt_update_and_upgrade`
This role does an `apt-get update`, `apt-get dist-upgrade` and a potential reboot (if packages got upgraded) on the specified hosts. This role does an `apt-get update`, `apt-get dist-upgrade`, `apt-get autoremove` and a potential reboot (if packages got upgraded) on the specified hosts.
## `hosts` ## `hosts`

View file

@ -11,3 +11,7 @@
register: apt_update_and_upgrade__upgrade_result register: apt_update_and_upgrade__upgrade_result
notify: notify:
- reboot the system - reboot the system
- name: Remove dependencies that are no longer required
ansible.builtin.apt:
autoremove: true