Skip to content

Commit

Permalink
retry on verify node ready
Browse files Browse the repository at this point in the history
  • Loading branch information
ricolin committed Jan 15, 2025
1 parent bb4951e commit c645cb9
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions molecule/kubernetes/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@
that:
- ansible_facts.services['kubelet.service'].status == 'enabled'

- name: Get all nodes
- name: Wait all nodes ready
ansible.builtin.command: kubectl get nodes
register: nodes
failed_when:
- nodes.rc != 0
- not(nodes.stdout.find('instance') != -1)

- name: Print node list
ansible.builtin.debug:
msg: "{{ nodes.stdout_lines }}"

- name: Assert no nody is not ready
ansible.builtin.assert:
that:
- nodes.stdout.find('NotReady') == -1
- nodes.stdout.find('NotReady') != -1
retries: 20
delay: 3

0 comments on commit c645cb9

Please sign in to comment.