summaryrefslogtreecommitdiffstats
path: root/roles/openshift_service_catalog/tasks/start_api_server.yml
blob: 84e542eafe4b13439b2f19c380159a19aa40e6c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
# Label nodes and wait for apiserver and controller to be running (at least one)
- name: Label {{ openshift.node.nodename }} for APIServer and controller deployment
  oc_label:
    name: "{{ openshift.node.nodename }}"
    kind: node
    state: add
    labels: "{{ openshift_service_catalog_nodeselector | default ({'openshift-infra': 'apiserver'}) | lib_utils_oo_dict_to_list_of_dict }}"

# wait to see that the apiserver is available
- name: wait for api server to be ready
  command: >
    curl -k https://apiserver.kube-service-catalog.svc/healthz
  args:
    # Disables the following warning:
    # Consider using get_url or uri module rather than running curl
    warn: no
  register: api_health
  until: api_health.stdout == 'ok'
  retries: 120
  delay: 1
  changed_when: false