fix(tailscale): run read-only status/ip commands under --check #21

Merged
jfraeys merged 2 commits from jfraeys/fix/tailscale-check-mode into main 2026-10-08 20:21:22 -04:00 AGit
Owner

Two read-only command tasks in the tailscale role (tailscale status --json, tailscale ip -4) are skipped under --check; the empty stdout then broke from_json and left tailscale_own_ipv4 undefined, so any --check of a play using the role failed before reaching its own tasks. Both now run with check_mode: false, and the role CLAUDE.md notes that tasks like these need it. Found while previewing the ci_ephemeral_provisioner deploy with --check --diff; with this change that run gets past the tailscale role. -- Generated with Claude Code

Two read-only `command` tasks in the tailscale role (`tailscale status --json`, `tailscale ip -4`) are skipped under `--check`; the empty stdout then broke `from_json` and left `tailscale_own_ipv4` undefined, so any `--check` of a play using the role failed before reaching its own tasks. Both now run with `check_mode: false`, and the role CLAUDE.md notes that tasks like these need it. Found while previewing the ci_ephemeral_provisioner deploy with `--check --diff`; with this change that run gets past the tailscale role. -- Generated with [Claude Code](https://claude.com/claude-code)
tailscale status --json and tailscale ip -4 are command tasks, which Ansible
skips in check mode. The empty stdout then broke from_json and left
tailscale_own_ipv4 undefined, so any --check run of a play using this role
failed before reaching its own tasks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs(tailscale): note that read-only command tasks feeding set_fact need check_mode: false
All checks were successful
Lint / lint (pull_request) Successful in 1m54s
ebfff8a226
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfraeys/infra!21
No description provided.