fix: apikey loading was broken

This commit is contained in:
2025-09-14 00:11:27 +00:00
parent 59283fff6d
commit 7547513738
2 changed files with 3 additions and 3 deletions

View File

@@ -63,8 +63,8 @@ python3 scripts/new_host.py \
ok "Inventory updated: $NAME → inventory/servers.yaml"
# --- Decrypt Hetzner token and apply Terraform ---
HCLOUD_TOKEN="$(sops -d --extract '["ops"]["hcloud_token"]' inventory/group_vars/secrets.sops.yaml 2>/dev/null || true)"
[[ -n "$HCLOUD_TOKEN" ]] || fail "Could not decrypt ops.hcloud_token from inventory/group_vars/secrets.sops.yaml. Ensure SOPS_AGE_KEY or keys.txt is set and token exists."
HCLOUD_TOKEN="$(sops -d --extract '["hetzner"]["token"]' secrets/hetzner-token.sops.yaml 2>/dev/null)"
[[ -n "$HCLOUD_TOKEN" ]] || fail "Could not decrypt ops.hcloud_token from secrets/hetzner-token.sops.yaml. Ensure SOPS_AGE_KEY or keys.txt is set and token exists."
pushd terraform/hetzner >/dev/null