mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 12:17:13 +00:00
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>
16 lines
522 B
Bash
Executable File
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
|