main.yml 719 B

123456789101112131415161718192021
  1. ---
  2. - name: Verify API Server
  3. # Using curl here since the uri module requires python-httplib2 and
  4. # wait_for port doesn't provide health information.
  5. command: >
  6. curl --silent --tlsv1.2
  7. {% if openshift.common.version_gte_3_2_or_1_2 | bool %}
  8. --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
  9. {% else %}
  10. --cacert {{ openshift.common.config_base }}/master/ca.crt
  11. {% endif %}
  12. {{ openshift.master.api_url }}/healthz/ready
  13. args:
  14. # Disables the following warning:
  15. # Consider using get_url or uri module rather than running curl
  16. warn: no
  17. register: api_available_output
  18. until: api_available_output.stdout == 'ok'
  19. retries: 120
  20. delay: 1
  21. changed_when: false