diff --git a/playbooks/connection_test.yaml b/playbooks/connection_test.yaml deleted file mode 100644 index 71a1ed4..0000000 --- a/playbooks/connection_test.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: connection test - hosts: all - tasks: - - name: debug - ansible.builtin.debug: - var: ansible_connection diff --git a/playbooks/reboot_test.yaml b/playbooks/reboot_test.yaml deleted file mode 100644 index 80f09c5..0000000 --- a/playbooks/reboot_test.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- name: reboot test - hosts: all - tasks: - - name: debug before - ansible.builtin.debug: - msg: before - - - name: reboot - ansible.builtin.include_role: - name: reboot - - - name: debug after - ansible.builtin.debug: - msg: after diff --git a/roles/apt_update_and_upgrade/handlers/main.yaml b/roles/apt_update_and_upgrade/handlers/main.yaml index 001bbe4..17f19f1 100644 --- a/roles/apt_update_and_upgrade/handlers/main.yaml +++ b/roles/apt_update_and_upgrade/handlers/main.yaml @@ -1,3 +1,6 @@ - name: reboot the system - become: true - ansible.builtin.reboot: + ansible.builtin.include_role: + role: reboot + vars: + # Simply don't reboot on local connections and rely on proper handling of /var/run/reboot-required. + reboot__local_handling: ignore