Refactored reboot playbook to create a 15 second delay and to run in async mode

This commit is contained in:
Khwezi
2026-04-11 16:33:37 +02:00
parent 160a93d93f
commit 421128b534

View File

@@ -5,11 +5,11 @@
become_method: sudo
tasks:
- name: Trigger system reboot
ansible.builtin.reboot:
msg: "Reboot initiated by Semaphore UI"
connect_timeout: 5
reboot_timeout: 600
pre_reboot_delay: 0
post_reboot_delay: 30
test_command: whoami
- name: Trigger reboot with a slight delay
ansible.builtin.shell: "sleep 15 && shutdown -r now"
async: 1
poll: 0
ignore_errors: true
- name: Reboot command issues, exiting play
ansible.builtin.meta: end_host