Commit Graph
2 Commits
Author SHA1 Message Date
Defame1297 29165a610f fix(tailscale): harden removal, restarts and the auth key check
Build / build (pull_request) Successful in 29s
Lint / lint (pull_request) Successful in 2m25s
Molecule / molecule (pull_request) Failing after 3m23s
- Removal passes on a host without a tailscaled unit, and the
  best-effort logout reports a change only when it succeeded.
- Under --check the service tasks run only when the unit exists, also
  with --tags configure on a host without the package.
- The auth key is required before any change only when the run includes
  the configure tasks; --tags remove, install and update need none. The
  assert in the up block stays as the hard guard.
- When the flags change or tailscaled is not active, the role clears its
  failure state and restarts it at once, so a daemon the package started
  without a TUN device does not stay in the start limit.
- The health tag is back on the configure include.
- The scenario tests removal without purge (state and defaults kept, a
  second removal passes) and a purge with a state directory the package
  does not delete itself, and waits for tailscaled to be active.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-26 20:47:49 +00:00
Defame1297 80c76b16ee 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
2026-11-26 19:08:25 +00:00