CSIT-1070 Update Ansible structure
[csit.git] / resources / tools / testbed-setup / ansible / roles / common / handlers / reboot.yaml
diff --git a/resources/tools/testbed-setup/ansible/roles/common/handlers/reboot.yaml b/resources/tools/testbed-setup/ansible/roles/common/handlers/reboot.yaml
new file mode 100644 (file)
index 0000000..01e1eb1
--- /dev/null
@@ -0,0 +1,14 @@
+---
+# file roles/common/handlers/reboot.yaml
+
+- name: Reboot host
+  command: shutdown -r now "Ansible updates triggered"
+  async: 0
+  poll: 0
+  ignore_errors: true
+  tags: reboot-host
+
+- name: Waiting for server to come back
+  local_action: wait_for host={{ inventory_hostname }}
+                state=started
+  tags: reboot-host