mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-10-31 08:28:54 +01:00
kubectl command on node must use short name
This commit is contained in:
parent
6b258763be
commit
b9cce2fd60
@ -26,7 +26,7 @@
|
||||
- name: Ensure uninstalled nodes are drained # noqa no-changed-when
|
||||
ansible.builtin.command:
|
||||
cmd: >-
|
||||
{{ k3s_install_dir }}/kubectl drain {{ item }}
|
||||
{{ k3s_install_dir }}/kubectl drain {{ hostvars[item].ansible_hostname }}
|
||||
--ignore-daemonsets
|
||||
--{{ k3s_drain_command[ansible_version.string is version_compare('1.22', '>=')] }}
|
||||
--force
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
- name: Ensure uninstalled nodes are removed # noqa no-changed-when
|
||||
ansible.builtin.command:
|
||||
cmd: "{{ k3s_install_dir }}/kubectl delete node {{ item }}"
|
||||
cmd: "{{ k3s_install_dir }}/kubectl delete node {{ hostvars[item].ansible_hostname }}"
|
||||
delegate_to: "{{ k3s_control_delegate }}"
|
||||
run_once: true
|
||||
when:
|
||||
|
Loading…
Reference in New Issue
Block a user