summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-master/restart_hosts.yml
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/common/openshift-master/restart_hosts.yml')
-rw-r--r--playbooks/common/openshift-master/restart_hosts.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/playbooks/common/openshift-master/restart_hosts.yml b/playbooks/common/openshift-master/restart_hosts.yml
new file mode 100644
index 000000000..b1c36718c
--- /dev/null
+++ b/playbooks/common/openshift-master/restart_hosts.yml
@@ -0,0 +1,17 @@
+- name: Restart master system
+ # https://github.com/ansible/ansible/issues/10616
+ shell: sleep 2 && shutdown -r now "OpenShift Ansible master rolling restart"
+ async: 1
+ poll: 0
+ ignore_errors: true
+ become: yes
+
+# Ensure the api_port is available.
+- name: Wait for master API to come back online
+ become: no
+ local_action:
+ module: wait_for
+ host="{{ inventory_hostname }}"
+ state=started
+ delay=10
+ port="{{ openshift.master.api_port }}"