summaryrefslogtreecommitdiff
path: root/roles/reboot-and-wait/tasks/main.yml
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2018-04-21 23:28:35 +0200
committerChristian Pointner <equinox@spreadspace.org>2018-04-21 23:28:35 +0200
commit2e5b51cc24b6f6c91e7f969fe14e3adc2d4e80f2 (patch)
tree6cbb61b2f17061fee06306a3ec2e58e2fc3e87de /roles/reboot-and-wait/tasks/main.yml
parentupdated google apt key (diff)
rename all .yaml to .yml
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) }}"