mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-10-31 14:36:20 -02:30
fix/ansible 2.19: tests: no implicit conditionals (#13479)
This commit is contained in:
@@ -5,14 +5,12 @@
|
|||||||
- name: Check kubectl output
|
- name: Check kubectl output
|
||||||
command: "{{ bin_dir }}/kubectl get nodes"
|
command: "{{ bin_dir }}/kubectl get nodes"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: get_nodes
|
|
||||||
|
|
||||||
- name: Check that all nodes are running and ready
|
- name: Check that all nodes are running and ready
|
||||||
command: "{{ bin_dir }}/kubectl get nodes --no-headers -o yaml"
|
command: >
|
||||||
|
{{ bin_dir }}/kubectl get nodes -o jsonpath-as-json='{.items[*].status.conditions[?(@.type == "Ready")]}'
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: get_nodes_yaml
|
register: nodes_ready_conditions
|
||||||
until:
|
until: nodes_ready_conditions.stdout | from_json | selectattr('status', '!=', "True") == []
|
||||||
# Check that all nodes are Status=Ready
|
|
||||||
- '(get_nodes_yaml.stdout | from_yaml)["items"] | map(attribute = "status.conditions") | map("items2dict", key_name="type", value_name="status") | map(attribute="Ready") | list | min'
|
|
||||||
retries: 30
|
retries: 30
|
||||||
delay: 10
|
delay: 10
|
||||||
|
|||||||
Reference in New Issue
Block a user