Skip to content

Commit bc03d1c

Browse files
authored
Fix adding token to existing cluster (#360)
Signed-off-by: James Otten <[email protected]>
1 parent 2d98982 commit bc03d1c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

roles/k3s_agent/tasks/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@
3535
INSTALL_K3S_EXEC: "agent"
3636
changed_when: true
3737

38-
- name: Add the token for joining the cluster to the environment
39-
no_log: true # avoid logging the server token
40-
ansible.builtin.lineinfile:
41-
path: "{{ systemd_dir }}/k3s-agent.service.env"
42-
line: "{{ item }}"
43-
with_items:
44-
- "K3S_TOKEN={{ token }}"
38+
- name: Add the token for joining the cluster to the environment
39+
no_log: true # avoid logging the server token
40+
ansible.builtin.lineinfile:
41+
path: "{{ systemd_dir }}/k3s-agent.service.env"
42+
line: "{{ item }}"
43+
with_items:
44+
- "K3S_TOKEN={{ token }}"
4545

4646
- name: Copy K3s service file
4747
register: k3s_agent_service

0 commit comments

Comments
 (0)