summaryrefslogtreecommitdiff
path: root/roles/reboot-and-wait/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/reboot-and-wait/tasks/main.yml')
-rw-r--r--roles/reboot-and-wait/tasks/main.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/roles/reboot-and-wait/tasks/main.yml b/roles/reboot-and-wait/tasks/main.yml
new file mode 100644
index 00000000..4c1b7097
--- /dev/null
+++ b/roles/reboot-and-wait/tasks/main.yml
@@ -0,0 +1,10 @@
+- name: reboot machine
+ shell: sleep 2 && shutdown -r now
+ async: 1
+ poll: 0
+ ignore_errors: true
+
+- name: waiting for host to come back
+ wait_for_connection:
+ delay: "{{ reboot_delay | default(60) }}"
+ timeout: "{{ reboot_timeout | default(300) }}"