fix: k3s-agent label/taint tasks use undefined ansible_hostname
Some checks failed
validate / lint (push) Failing after 1s
Some checks failed
validate / lint (push) Failing after 1s
ansible.cfg sets inject_facts_as_vars: False repo-wide (the ollama role already follows this via ansible_facts['system']), but these two tasks referenced the bare ansible_hostname magic var, which doesn't exist under that setting. Surfaced today as a hard failure re-running setup-gpu-node - previously latent since these nodes' labels/taints were already correct from whenever they last applied cleanly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
69d880186a
commit
12718203ac
@ -24,7 +24,7 @@
|
||||
- name: Apply node labels
|
||||
ansible.builtin.shell:
|
||||
cmd: >
|
||||
k3s kubectl label node {{ ansible_hostname }}
|
||||
k3s kubectl label node {{ ansible_facts['hostname'] }}
|
||||
{{ item.key }}={{ item.value }} --overwrite
|
||||
loop: "{{ k3s_node_labels | dict2items }}"
|
||||
delegate_to: minisforum
|
||||
@ -35,7 +35,7 @@
|
||||
- name: Apply node taints
|
||||
ansible.builtin.shell:
|
||||
cmd: >
|
||||
k3s kubectl taint node {{ ansible_hostname }}
|
||||
k3s kubectl taint node {{ ansible_facts['hostname'] }}
|
||||
{{ item }} --overwrite
|
||||
loop: "{{ k3s_node_taints }}"
|
||||
delegate_to: minisforum
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user