summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2017-02-10 12:23:35 -0400
committerDevan Goodwin <dgoodwin@redhat.com>2017-02-10 16:35:03 -0400
commit781d2a1dc87bdc37f02ea6f1a3e83abb666f9c49 (patch)
tree7190c35cdf48ef901a13ebce43f69c6ccb6c4ddc /playbooks
parentb1565e9e843e99c6b3c0d99518c27249472f57fe (diff)
downloadopenshift-781d2a1dc87bdc37f02ea6f1a3e83abb666f9c49.tar.gz
openshift-781d2a1dc87bdc37f02ea6f1a3e83abb666f9c49.tar.bz2
openshift-781d2a1dc87bdc37f02ea6f1a3e83abb666f9c49.tar.xz
openshift-781d2a1dc87bdc37f02ea6f1a3e83abb666f9c49.zip
More fixes for reboot/wait for hosts.
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/common/openshift-master/restart_hosts.yml16
1 files changed, 14 insertions, 2 deletions
diff --git a/playbooks/common/openshift-master/restart_hosts.yml b/playbooks/common/openshift-master/restart_hosts.yml
index a9750e40f..67ba0aa2e 100644
--- a/playbooks/common/openshift-master/restart_hosts.yml
+++ b/playbooks/common/openshift-master/restart_hosts.yml
@@ -7,14 +7,26 @@
ignore_errors: true
become: yes
+# WARNING: This process is riddled with weird behavior.
+
+# Workaround for https://github.com/ansible/ansible/issues/21269
+- set_fact:
+ wait_for_host: "{{ ansible_host }}"
+
+# Ansible's blog documents this *without* the port, which appears to now
+# just wait until the timeout value and then proceed without checking anything.
+# port is now required.
+#
+# However neither ansible_ssh_port or ansible_port are reliably defined, likely
+# only if overridden. Assume a default of 22.
- name: Wait for master to restart
local_action:
module: wait_for
- host="{{ ansible_host }}"
+ host="{{ wait_for_host }}"
state=started
delay=10
timeout=600
- port="{{ ansible_ssh_port }}"
+ port="{{ ansible_port | default(ansible_ssh_port | default(22,boolean=True),boolean=True) }}"
become: no
# Now that ssh is back up we can wait for API on the remote system,