diff --git a/roles/k3s_agent/templates/k3s.service.j2 b/roles/k3s_agent/templates/k3s.service.j2 index 52aa272ea..19795c6f4 100644 --- a/roles/k3s_agent/templates/k3s.service.j2 +++ b/roles/k3s_agent/templates/k3s.service.j2 @@ -11,7 +11,7 @@ ExecStartPre=-/sbin/modprobe overlay ExecStart=/usr/local/bin/k3s agent \ --server https://{{ apiserver_endpoint | ansible.utils.ipwrap }}:6443 \ {% if is_pxe_booted | default(false) %}--snapshotter native \ - {% endif %}--token {{ hostvars[groups[group_name_master | default('master')][0]]['token'] | default(k3s_token) }} \ + {% endif %}--token {{ hostvars[groups[group_name_master | default('master')][0]]['token'] | default(k3s_token) | replace( '%', '%%' ) }} \ {{ extra_agent_args }} KillMode=process Delegate=yes