2023-09-25 02:57:30 +02:00
|
|
|
- name: update, upgrade and potentially reboot
|
|
|
|
become: true
|
|
|
|
block:
|
2024-11-23 02:49:23 +01:00
|
|
|
- name: apt-get update
|
|
|
|
ansible.builtin.apt:
|
|
|
|
update-cache: true
|
2023-09-25 02:57:30 +02:00
|
|
|
|
2024-11-23 02:49:23 +01:00
|
|
|
- name: apt-get dist-upgrade
|
|
|
|
ansible.builtin.apt:
|
|
|
|
upgrade: dist
|
|
|
|
register: apt_update_and_upgrade__upgrade_result
|
2023-09-25 02:57:30 +02:00
|
|
|
|
2024-11-23 02:49:23 +01:00
|
|
|
- name: reboot, after package upgrade
|
|
|
|
ansible.builtin.reboot:
|
|
|
|
when: apt_update_and_upgrade__upgrade_result.changed
|