start_api_server.yml 779 B

12345678910111213141516171819202122
  1. ---
  2. # Label nodes and wait for apiserver and controller to be running (at least one)
  3. - name: Label {{ openshift.node.nodename }} for APIServer and controller deployment
  4. oc_label:
  5. name: "{{ openshift.node.nodename }}"
  6. kind: node
  7. state: add
  8. labels: "{{ openshift_service_catalog_nodeselector | default ({'openshift-infra': 'apiserver'}) | oo_dict_to_list_of_dict }}"
  9. # wait to see that the apiserver is available
  10. - name: wait for api server to be ready
  11. command: >
  12. curl -k https://apiserver.kube-service-catalog.svc/healthz
  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_health
  18. until: api_health.stdout == 'ok'
  19. retries: 120
  20. delay: 1
  21. changed_when: false