fix(token): escape percent signs used in k3s token (#682)

- systemd treats % as a specifier in ExecStart, so token values containing %
  fail with 'failed to resolve unit specifiers invalid slot'
- escape % to %% in the agent unit file
- escape % to %% in server_init_args so the multi-master bootstrap path
  (systemd-run k3s-init) handles % tokens too

Co-authored-by: finaldoom <677609+FinalDoom@users.noreply.github.com>
This commit is contained in:
Techno Tim
2026-08-02 14:27:17 -05:00
committed by GitHub
parent bb006cf157
commit 890d43b339
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ server_init_args: >-
{% else %}
--server https://{{ hostvars[groups[group_name_master | default('master')][0]].k3s_node_ip | split(",") | first | ansible.utils.ipwrap }}:6443
{% endif %}
--token {{ k3s_token }}
--token {{ k3s_token | replace('%', '%%') }}
{% endif %}
{{ extra_server_args }}