feat(tailscale): add the tailscale role

Installs Tailscale from the upstream APT repository with the keyring
pinned by sha256, enables tailscaled and, with tailscale_up (default
true), runs tailscale up with tailscale_auth_key while the node is not
Running. It can also update to the APT candidate version and remove or
purge.

The role asserts Ubuntu and follows the host's release, and requires a
non-empty auth key before any change whenever tailscale up will run.
tailscale_userspace_networking now sets --tun=userspace-networking in
the FLAGS of /etc/default/tailscaled, where tailscaled reads it, instead
of passing it to tailscale up.

The molecule scenario installs the real package on noble and resolute
without joining a tailnet, and covers the update and purge paths and
the refusal cases.

Closes #396

Assisted-by: Claude Code:claude-opus-5-5
This commit is contained in:
Defame1297 committed 2026-11-26 19:08:25 +00:00
1 parent 31634c4eef
commit 80c76b16ee
18 files changed
+943 -3

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ authors:
description: >-
Reusable, hardened Ansible roles for a self-hosted home lab (cloudflared, docker, fail2ban,
gitea, gitea_runner, network_interfaces, pihole, pve_lxc, sshd, system_baseline,
systemd_hardening, traefik, ufw, user_management; _binary_update is internal).
systemd_hardening, tailscale, traefik, ufw, user_management; _binary_update is internal).
license:
- GPL-3.0-or-later
tags: