made sure that handlers run prior to hostname change as well as a reboot in which the server is rendered inaccessible

This commit is contained in:
2026-06-18 19:20:56 -04:00
parent 57a3e876b8
commit bd3029b914

View File

@@ -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"
msg: "Rebooting machine.."
connect_timeout: 0
test_command: ~