File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 14
14
enabled : true
15
15
16
16
# Possible race here as there is a delay between agents disconnecting and being registered as down, probably won't be hit in general use though
17
- - name : Check if k3s agents are connected
17
+ - name : Check which k3s agents are connected
18
18
ansible.builtin.shell :
19
19
cmd : kubectl get nodes --no-headers | grep -w Ready
20
20
register : _k3s_connected_nodes
21
- retries : 6 # there may be a delay before the server reconnects to itself
21
+ retries : 6 # task may fail if server is not ready yet
22
22
delay : 10
23
23
until : not _k3s_connected_nodes.failed
24
24
25
- - name : Generate new bootstrap token
25
+ - name : Generate new bootstrap token if not all agents are connected
26
26
no_log : true
27
27
when : _k3s_connected_nodes.stdout_lines | length != groups['k3s'] | length
28
28
shell :
You can’t perform that action at this time.
0 commit comments