Files
computer-playbook/scripts/tests/deploy/swarm/routine/backup/01_ssh_trust.sh
T
kevinveenbirkenbachandClaude Fable 5 d7af59a93b test(swarm): deploy the backup-host roles and drill the real units
extend_inventory maps svc-bkp-remote-2-local + svc-bkp-local-2-device onto
the backup host and write_extras configures them (backup_providers =
manager + NFS server IPs; device mount/target/source), so the matrix
deploy installs the real systemd units there. The drill now exercises
them: 01_ssh_trust.sh only installs the pull identity, the remote-2-local
unit pulls every provider (replacing both manual pull calls), and after
02_luks_device.sh simulates the USB plug the local-2-device unit performs
the device sync; the device recover passes the configured target subpath
via --device-target. Unit absence on the backup host is now a hard
failure since the roles deploy with the round.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 03:15:53 +02:00

16 lines
522 B
Bash
Executable File

#!/usr/bin/env bash
# Runs in-node on the backup host. Installs the pull identity so the
# deployed svc-bkp-remote-2-local unit can reach backup@<provider> over
# the user-backup ssh wrapper.
#
# Arguments: none.
# Stdin: the backup ssh private key (generated by write_extras).
set -euo pipefail
mkdir -p /root/.ssh
chmod 700 /root/.ssh
cat >/root/.ssh/id_ed25519
chmod 600 /root/.ssh/id_ed25519
printf 'Host *\n StrictHostKeyChecking no\n UserKnownHostsFile /dev/null\n' >/root/.ssh/config
chmod 600 /root/.ssh/config