From bc03d1c0d053bb3e3362c526aa38bc8762d1f816 Mon Sep 17 00:00:00 2001 From: james-otten Date: Thu, 12 Sep 2024 12:54:11 -0400 Subject: [PATCH] Fix adding token to existing cluster (#360) Signed-off-by: James Otten --- roles/k3s_agent/tasks/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/k3s_agent/tasks/main.yml b/roles/k3s_agent/tasks/main.yml index 8db49c0..2dafa3c 100644 --- a/roles/k3s_agent/tasks/main.yml +++ b/roles/k3s_agent/tasks/main.yml @@ -35,13 +35,13 @@ INSTALL_K3S_EXEC: "agent" changed_when: true - - name: Add the token for joining the cluster to the environment - no_log: true # avoid logging the server token - ansible.builtin.lineinfile: - path: "{{ systemd_dir }}/k3s-agent.service.env" - line: "{{ item }}" - with_items: - - "K3S_TOKEN={{ token }}" +- name: Add the token for joining the cluster to the environment + no_log: true # avoid logging the server token + ansible.builtin.lineinfile: + path: "{{ systemd_dir }}/k3s-agent.service.env" + line: "{{ item }}" + with_items: + - "K3S_TOKEN={{ token }}" - name: Copy K3s service file register: k3s_agent_service