Add role for ensuring system is updated and potentially rebooted
The role also cleans up the local repository of retrieved package files that can no longer be downloaded.
This commit is contained in:
5
playbooks/roles/system_update/handlers/main.yaml
Normal file
5
playbooks/roles/system_update/handlers/main.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Reboot to apply potentially outstanding kernel updates and make sure all the
|
||||||
|
# latest versions of libraries are used.
|
||||||
|
- name: Reboot, if stuff changed, for good measure
|
||||||
|
ansible.builtin.reboot:
|
||||||
|
become: true
|
||||||
7
playbooks/roles/system_update/tasks/main.yaml
Normal file
7
playbooks/roles/system_update/tasks/main.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
- name: Ensure the system is updated and no longer needed files are cleaned up
|
||||||
|
ansible.builtin.apt:
|
||||||
|
update_cache: true
|
||||||
|
upgrade: dist
|
||||||
|
autoclean: true
|
||||||
|
become: true
|
||||||
|
notify: Reboot, if stuff changed, for good measure
|
||||||
Reference in New Issue
Block a user