From bd3029b914146af0a6110581ceda6457eec16315 Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Thu, 18 Jun 2026 19:20:56 -0400 Subject: [PATCH] made sure that handlers run prior to hostname change as well as a reboot in which the server is rendered inaccessible --- init@vps.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/init@vps.yml b/init@vps.yml index 815934a..16fbeec 100644 --- a/init@vps.yml +++ b/init@vps.yml @@ -31,6 +31,8 @@ ansible.builtin.include_role: name: init-server tasks_from: ssh-users + - name: Flush handlers + ansible.builtin.meta: flush_handlers - name: Update hostname become: true ansible.builtin.hostname: @@ -39,7 +41,14 @@ become: true ansible.builtin.command: cmd: "hostnamectl set-icon-name computer-server" + - name: Notifying user that all processes have finished + ansible.builtin.debug: + msg: All processes finished. Hit enter to reboot machine. + - name: Ensuring user has read prior message regarding upcoming reboot + ansible.builtin.pause: - name: Rebooting machine for hostname change become: true ansible.builtin.reboot: - msg: "Rebooting machine" \ No newline at end of file + msg: "Rebooting machine.." + connect_timeout: 0 + test_command: ~ \ No newline at end of file