Testing fallback functionality

This commit is contained in:
2025-08-05 00:57:57 -04:00
parent 73fb9ac976
commit 16f8bdd07d

View File

@ -9,7 +9,16 @@
verified_reboot_pre_boot_id: "{{ verified_reboot_pre_boot_id_raw['content'] | b64decode | trim }}" verified_reboot_pre_boot_id: "{{ verified_reboot_pre_boot_id_raw['content'] | b64decode | trim }}"
verified_reboot_check_count: 0 verified_reboot_check_count: 0
- name: Reboot the host - name: Reboot host using reboot module or fallback
block:
- name: Reboot the host [reboot module]
ansible.builtin.reboot:
msg: "{{ verified_reboot_reboot_msg }}"
pre_reboot_delay: "{{ verified_reboot_reboot_time }}"
connect_timeout: "{{ verified_reboot_wait_conn_timeout }}"
reboot_timeout: "{{ verified_reboot_wait_delay }}"
rescue:
- name: Reboot the host [fallback]
ansible.builtin.command: ansible.builtin.command:
cmd: "/usr/sbin/shutdown -r +{{ verified_reboot_reboot_time }} '{{ verified_reboot_reboot_msg }}'" cmd: "/usr/sbin/shutdown -r +{{ verified_reboot_reboot_time }} '{{ verified_reboot_reboot_msg }}'"