main.yml 991 B

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