You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
615 B

  1. ---
  2. - hosts: kube_control_plane
  3. tasks:
  4. - name: Check the API servers are responding
  5. uri:
  6. url: "https://{{ access_ip | default(ansible_default_ipv4.address) }}:{{ kube_apiserver_port | default(6443) }}/version"
  7. validate_certs: no
  8. status_code: 200
  9. register: apiserver_response
  10. - debug: # noqa unnamed-task
  11. msg: "{{ apiserver_response.json }}"
  12. - name: Check API servers version
  13. assert:
  14. that:
  15. - apiserver_response.json.gitVersion == kube_version
  16. fail_msg: "apiserver version different than expected {{ kube_version }}"
  17. when: kube_version is defined