c12s-kubespray/tests/testcases/010_check-apiserver.yml
2020-04-21 12:31:53 -07:00

20 lines
No EOL
586 B
YAML

---
- hosts: kube-master
tasks:
- name: Check the API servers are responding
uri:
url: "https://{{ access_ip | default(ansible_default_ipv4.address) }}:{{ kube_apiserver_port | default(6443) }}/version"
validate_certs: no
status_code: 200
register: apiserver_response
- debug:
msg: "{{ apiserver_response.json }}"
- name: Check API servers version
assert:
that:
- apiserver_response.json.gitVersion == kube_version
fail_msg: "apiserver version different than expected {{ kube_version }}"
when: kube_version is defined