mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Escape regex special characters in token value (#391)
Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
state: absent
|
state: absent
|
||||||
path: "{{ systemd_dir }}/k3s.service.env"
|
path: "{{ systemd_dir }}/k3s.service.env"
|
||||||
regexp: "^K3S_TOKEN=\\s*(?!{{ token | default('') }}\\s*$)"
|
regexp: "^K3S_TOKEN=\\s*(?!{{ token | default('') | regex_escape }}\\s*$)"
|
||||||
|
|
||||||
# Add the token to the environment if it has been provided.
|
# Add the token to the environment if it has been provided.
|
||||||
# Otherwise, let the first server create one on the first run.
|
# Otherwise, let the first server create one on the first run.
|
||||||
|
|||||||
Reference in New Issue
Block a user