mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-12-30 17:57:44 +01:00
Compare kubectl get nodes
with ansible_hostname, not ansible_fqdn/i… (#212)
Co-authored-by: Igor Tretyak <itretyak@ptsecurity.com>
This commit is contained in:
parent
37fda0a953
commit
b87991cc28
@ -34,7 +34,7 @@
|
||||
run_once: true
|
||||
when:
|
||||
- kubectl_get_nodes_result.stdout is defined
|
||||
- item in kubectl_get_nodes_result.stdout
|
||||
- hostvars[item].ansible_hostname in kubectl_get_nodes_result.stdout
|
||||
- hostvars[item].k3s_state is defined
|
||||
- hostvars[item].k3s_state == 'uninstalled'
|
||||
loop: "{{ ansible_play_hosts }}"
|
||||
@ -47,7 +47,7 @@
|
||||
run_once: true
|
||||
when:
|
||||
- kubectl_get_nodes_result.stdout is defined
|
||||
- item in kubectl_get_nodes_result.stdout
|
||||
- hostvars[item].ansible_hostname in kubectl_get_nodes_result.stdout
|
||||
- hostvars[item].k3s_state is defined
|
||||
- hostvars[item].k3s_state == 'uninstalled'
|
||||
loop: "{{ ansible_play_hosts }}"
|
||||
|
Loading…
Reference in New Issue
Block a user