Skip to content

Commit b6eee31

Browse files
authored
chore: handle os reboot (#1160)
1 parent 05f3afb commit b6eee31

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

modules/powervs-vpc-landing-zone/submodules/ansible/templates-ansible/configure-monitoring-instance/playbook-configure-monitoring-instance.yml.tftpl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
register: update_result
2121
when: "'SLES' in ansible_distribution"
2222

23-
- name: Reboot system with delay
24-
shell: "(sleep 2 && reboot) &"
25-
async: 1
26-
poll: 0
23+
- name: Reboot system (SLES)
24+
ansible.builtin.reboot:
25+
msg: "Reboot initiated by Ansible"
26+
connect_timeout: 5 # SSH connect timeout
27+
reboot_timeout: 600 # wait up to 10 min for the node to come back
28+
pre_reboot_delay: 2 # wait 2s before sending reboot
29+
post_reboot_delay: 30 # wait 30s after system comes back before marking success
2730
when: update_result is defined and update_result.changed

0 commit comments

Comments
 (0)