diff --git a/etc/kayobe/ansible/reboot.yml b/etc/kayobe/ansible/reboot.yml index aa73a2617d..63d5ce9ae8 100644 --- a/etc/kayobe/ansible/reboot.yml +++ b/etc/kayobe/ansible/reboot.yml @@ -5,6 +5,7 @@ gather_facts: false vars: reboot_timeout_s: "{{ 20 * 60 }}" + post_reboot_delay_s: 5 # Extra delay to ensure SSH is working reliably reboot_with_bootstrap_user: false ansible_user: "{{ bootstrap_user if reboot_with_bootstrap_user | bool else kayobe_ansible_user }}" ansible_ssh_common_args: "{{ '-o StrictHostKeyChecking=no' if reboot_with_bootstrap_user | bool else '' }}" @@ -32,7 +33,8 @@ - name: Reboot and wait become: true ansible.builtin.reboot: - reboot_timeout: "{{ reboot_timeout_s }}" + post_reboot_delay: "{{ post_reboot_delay_s | int }}" + reboot_timeout: "{{ reboot_timeout_s | int }}" search_paths: # Systems running molly-guard hang waiting for confirmation before rebooting without this. - /lib/molly-guard diff --git a/releasenotes/notes/add-post-reboot-delay-2ac3fa99badf4601.yaml b/releasenotes/notes/add-post-reboot-delay-2ac3fa99badf4601.yaml new file mode 100644 index 0000000000..468631aefb --- /dev/null +++ b/releasenotes/notes/add-post-reboot-delay-2ac3fa99badf4601.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Adds an extra delay after reboot in the ``reboot.yml`` playbook to ensure + hosts can be reached reliably. The default delay is 5 seconds and can be + customised with the ``post_reboot_delay_s`` variable.