summaryrefslogtreecommitdiffstats
path: root/roles/os_reboot_server
diff options
context:
space:
mode:
authorMatt Woodson <mwoodson@redhat.com>2016-02-26 09:55:07 -0500
committerMatt Woodson <mwoodson@redhat.com>2016-02-26 09:55:07 -0500
commit6f86f71e08a4b1e442a9e33b317c0c37451eed80 (patch)
tree798fa2dbdb835b2d1a2ffe98f5c1bc6ae3ec87fc /roles/os_reboot_server
parent625addec56337b940dd72ac187f3e9f3f652178e (diff)
downloadopenshift-6f86f71e08a4b1e442a9e33b317c0c37451eed80.tar.gz
openshift-6f86f71e08a4b1e442a9e33b317c0c37451eed80.tar.bz2
openshift-6f86f71e08a4b1e442a9e33b317c0c37451eed80.tar.xz
openshift-6f86f71e08a4b1e442a9e33b317c0c37451eed80.zip
added os_utils, os_reboot_server role; removed containerization stuff from the updated
Diffstat (limited to 'roles/os_reboot_server')
-rw-r--r--roles/os_reboot_server/tasks/main.yaml16
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/os_reboot_server/tasks/main.yaml b/roles/os_reboot_server/tasks/main.yaml
new file mode 100644
index 000000000..581ed3e0a
--- /dev/null
+++ b/roles/os_reboot_server/tasks/main.yaml
@@ -0,0 +1,16 @@
+---
+# Role to reboot a server
+- name: Restart server
+ shell: sleep 2 && shutdown -r now "Ansible updates triggered"
+ async: 1
+ poll: 0
+ ignore_errors: true
+
+- name: Wait for server to restart
+ local_action:
+ module: wait_for
+ host={{ ansible_ssh_host }}
+ port=22
+ delay=3
+ timeout=300
+ sudo: false