Skip to content

Commit

Permalink
Compare kubectl get nodes with ansible_hostname, not ansible_fqdn/i… (
Browse files Browse the repository at this point in the history
#212)

Co-authored-by: Igor Tretyak <[email protected]>
  • Loading branch information
fragpit and Igor Tretyak committed Dec 9, 2023
1 parent 37fda0a commit b87991c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/ensure_drain_and_remove_nodes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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 }}"
Expand Down

0 comments on commit b87991c

Please sign in to comment.