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
753 B

  1. ---
  2. - name: Testcases checking nodes
  3. hosts: kube_control_plane[0]
  4. vars:
  5. bin_dir: /usr/local/bin
  6. tasks:
  7. - import_role: # noqa name[missing]
  8. name: cluster-dump
  9. - name: Check kubectl output
  10. command: "{{ bin_dir }}/kubectl get nodes"
  11. changed_when: false
  12. register: get_nodes
  13. - name: Check that all nodes are running and ready
  14. command: "{{ bin_dir }}/kubectl get nodes --no-headers -o yaml"
  15. changed_when: false
  16. register: get_nodes_yaml
  17. until:
  18. # Check that all nodes are Status=Ready
  19. - '(get_nodes_yaml.stdout | from_yaml)["items"] | map(attribute = "status.conditions") | map("items2dict", key_name="type", value_name="status") | map(attribute="Ready") | list | min'
  20. retries: 30
  21. delay: 10