diff --git a/scripts/audit-fleet.sh b/scripts/audit-fleet.sh index 9b52f16..c9574d8 100755 --- a/scripts/audit-fleet.sh +++ b/scripts/audit-fleet.sh @@ -29,8 +29,6 @@ PROBE='id -un; hostname; sudo -n id -un 2>/dev/null || echo SUDO_FAIL' # DNS/VM names. Anything not listed is assumed to match its Tailscale name. knel_alias() { case "$1" in - homeassistant) printf '%s' "pfv-bms" ;; - umbrel) printf '%s' "tsys-umbrel" ;; *) printf '%s' "$1" ;; esac } @@ -92,7 +90,7 @@ for node in "${PROX_NODES[@]}"; do done tailscale status --json 2>/dev/null \ - | jq -r '.Peer[] | select(.OS == "linux") | [.HostName, .TailscaleIPs[0], (.Online|tostring)] | @tsv' \ + | jq -r '.Peer[] | select(.OS == "linux") | [(.DNSName | split(".")[0]), .TailscaleIPs[0], (.Online|tostring)] | @tsv' \ | sort > "$TS_CACHE" total="$(wc -l < "$TS_CACHE")" @@ -115,7 +113,7 @@ while IFS=$'\t' read -r host ts_ip online; do fi case "$host" in - tsys-cloudron-new) continue ;; # Reston prod VPS — out of audit scope + tsys-cloudron) continue ;; # Reston prod VPS (OS hostname tsys-cloudron-new) — out of scope netbird) continue ;; # Reston VPS (NetBird controller) — name-checked only stlp-3dscanner) continue ;; # offline ~7mo; user pulled from audit scope sectestbed-sandbox) continue ;; # disposable test VM — frequently broken by design @@ -128,7 +126,7 @@ while IFS=$'\t' read -r host ts_ip online; do fi case "$host" in - homeassistant|umbrel) + pfv-bms|tsys-umbrel) printf '%s|%s|%s|%s|%s|%s|%s|%s|%s|%s\n' \ "$host" "$ts_ip" "$online" "$fqdn" "$dns_result" "$vm_name" "-" "BY_DESIGN_NO_SSH" "-" "-" continue ;;