homelab-codex-ws/scripts/onboard
Oskar Kapala 471ba09c4a fix(onboard/00-access): suppress known-hosts warning in Tailscale verify
On first SSH to a new mesh hostname, OpenSSH emits
"Warning: Permanently added 'lustro' to the list of known hosts"
on stderr. The previous code used 2>&1, merging it into the captured
arch variable, which caused the arch assertion to fail with
arch="Warning:Permanentlyadded...".

Fix:
- Add dedicated _TS_SSH opts array with -o LogLevel=ERROR, which
  suppresses INFO-level messages (known-hosts, banner) at source
- Remove 2>&1 — stderr is no longer merged into the captured value
- Run only `uname -m` instead of `echo ok && uname -m`; take the last
  non-empty stdout line to be robust against any remaining preamble
- Change arch mismatch from warn to die in live mode (warn in dry-run)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 15:28:21 +02:00
..
lib fix(onboard): fix yaml_get fallback — strip inline comments and fix greedy colon match 2026-06-08 15:16:06 +02:00
steps fix(onboard/00-access): suppress known-hosts warning in Tailscale verify 2026-06-08 15:28:21 +02:00
onboard.sh fix(onboard): propagate dry-run into steps via run() helper 2026-06-08 15:01:09 +02:00