commit 6b568d19c1658758ae8a81e990dabb8825f208fc
parent 5ad62cf70000686d89e8e08362aa0c97502a8780
Author: Florian Dold <florian@dold.me>
Date: Mon, 24 Feb 2025 00:29:01 +0100
use default inventory, limit
Diffstat:
4 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/extract-borg-key.sh b/extract-borg-key.sh
@@ -3,7 +3,8 @@
set -eu
ansible-playbook \
- --inventory inventories/tops \
+ --inventory inventories/default \
+ --limit "${1:-spec}" \
--user root \
playbooks/borg-ssh-export.yml
cat borg.pub/*/root/.ssh/borg.pub
diff --git a/sanction-check.sh b/sanction-check.sh
@@ -3,7 +3,7 @@
set -eu
if [ -z ${1:-} ]
then
- echo "Call with 'test' or 'tops' as 1st argument to select which configuration to use"
+ echo "Call with 'spec' or other host/group as target"
exit 1
fi
if [ -z ${2:-} ]
@@ -19,8 +19,7 @@ fi
ansible-playbook \
--extra-vars "SANCTION_LIST=$2" \
- --extra-vars "@playbooks/$1-public.yml" \
--verbose \
- --inventory inventories/tops \
- --user root \
+ --limit "$1" \
+ --inventory inventories/default \
playbooks/sanctionlist-check.yml
diff --git a/setup-pixel-borg.sh b/setup-pixel-borg.sh
@@ -9,7 +9,8 @@ then
fi
ansible-playbook \
--extra-vars PIXEL_BORG_KEY="$PIXEL_BORG_KEY" \
- --inventory inventories/tops \
+ --inventory inventories/default \
+ --limit "${1:-spec}" \
--user root \
playbooks/pixel-borg.yml
mv borg-repokey/*/home/borg/borg-repo.key .
diff --git a/start-borg-backups.sh b/start-borg-backups.sh
@@ -8,10 +8,11 @@ then
exit 1
fi
-ansible-playbook --verbose \
- --extra-vars BORG_PASSPHRASE="$BORG_PASSPHRASE" \
- --inventory inventories/tops \
- --user root \
- playbooks/borg-start.yml
+ansible-playbook \
+ --verbose \
+ --extra-vars BORG_PASSPHRASE="$BORG_PASSPHRASE" \
+ --inventory inventories/default \
+ --limit "${1:-spec}" \
+ playbooks/borg-start.yml
exit 0