summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/tasks/check_master_api_is_ready.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_master/tasks/check_master_api_is_ready.yml')
-rw-r--r--roles/openshift_master/tasks/check_master_api_is_ready.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/openshift_master/tasks/check_master_api_is_ready.yml b/roles/openshift_master/tasks/check_master_api_is_ready.yml
new file mode 100644
index 000000000..7e8a7a596
--- /dev/null
+++ b/roles/openshift_master/tasks/check_master_api_is_ready.yml
@@ -0,0 +1,14 @@
+---
+- name: Wait for API to become available
+ # Using curl here since the uri module requires python-httplib2 and
+ # wait_for port doesn't provide health information.
+ command: >
+ curl --silent --tlsv1.2
+ --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
+ {{ openshift.master.api_url }}/healthz/ready
+ register: l_api_available_output
+ until: l_api_available_output.stdout == 'ok'
+ retries: 120
+ delay: 1
+ run_once: true
+ changed_when: false