Skip to content

Commit 316ff5d

Browse files
raypapparaypappa
authored andcommitted
fix(headscale): don't install tailscale agent on headscale node
Overriding the group var for headscale to be blank causes the role to create a new token, which isn't needed. Instead fixing the code to only run the install for tailscale agent on not the nodes fixes the issue
1 parent 2ee3c13 commit 316ff5d

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

ansible/group_vars/headscale.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
---
22
headscale_version: 0.23.0-alpha9
33
tailscale_args: "--login-server='http://weasel.stoneydavis.com' --advertise-exit-node"
4-
tailscale_authkey: ""

ansible/roles/common/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
when:
8686
- tailscale_authkey is defined
8787
- tailscale_authkey | length > 0
88+
- inventory_hostname not in groups['headscale']
8889
tags:
8990
- tailscale
9091
- name: Set hostname if specified

ansible/roles/headscale/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@
8989
community.aws.secretsmanager_secret:
9090
name: weasel.stoneydavis.com/headscale/pre-auth-key
9191
secret_type: string
92-
secret: "{{ headscale_pre_auth_key.stdout | from_json | json_query('.key')
92+
secret: "{{ headscale_pre_auth_key.stdout | from_json | json_query('key')
9393
}}"

0 commit comments

Comments
 (0)