Skip to content

Commit

Permalink
Fix redacting the auth key when tailscale up fails
Browse files Browse the repository at this point in the history
This patch redacts the authkey from `tailscale up` stderr output based
on `tailscale_authkey` directly instead of the `tskey.*` regex. The same
change was already applied for the stdout logging in artis3n#328.
  • Loading branch information
fredrikekre committed Mar 26, 2024
1 parent 7ebbe49 commit ac66b4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,6 @@

- name: Install | Report redacted failure from "tailscale up" # noqa: no-handler
ansible.builtin.fail:
msg: "{{ tailscale_start.stderr | default () | regex_replace('tskey.*\\s', 'REDACTED ') | regex_replace('\\t', '') | split('\n') }}"
msg: "{{ tailscale_start.stderr | default () | regex_replace(tailscale_authkey, 'REDACTED') | regex_replace('\\t', '') | split('\n') }}"
when:
- tailscale_start is failed

0 comments on commit ac66b4d

Please sign in to comment.