feat: Auto-cleanup stale Tailscale devices before cluster boot
Some checks failed
Deploy Cluster / Terraform (push) Successful in 2m17s
Deploy Cluster / Ansible (push) Failing after 6m35s

Adds tailscale-cleanup Ansible role that uses the Tailscale API to
delete offline devices matching reserved hostnames (e.g. rancher).
Runs during site.yml before Finalize to prevent hostname collisions
like rancher-1 on rebuild.

Requires TAILSCALE_API_KEY (API access token) passed as extra var.
This commit is contained in:
2026-03-29 11:47:53 +00:00
parent 6e5b0518be
commit 5269884408
3 changed files with 57 additions and 0 deletions

View File

@@ -128,6 +128,16 @@
roles:
- doppler-bootstrap
- name: Clean up stale Tailscale devices
hosts: localhost
connection: local
vars:
tailscale_reserved_hostnames:
- rancher
roles:
- tailscale-cleanup
- name: Finalize
hosts: localhost
connection: local