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.

24 lines
718 B

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