Add apt/run-playbook.sh

This commit is contained in:
2026-06-17 16:37:48 +00:00
parent d5d1d3d80e
commit ec9962fd5e
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
set -e # Exit if any command fails
INVENTORY_FILE="../inventory.ini"
PLAYBOOK_FILE="playbook.yml"
if [ ! -f "$INVENTORY_FILE" ]; then
echo "Error: Inventory file not found at $INVENTORY_FILE"
exit 1
fi
if [ ! -f "$PLAYBOOK_FILE" ]; then
echo "Error: Playbook file not found at $PLAYBOOK_FILE"
exit 1
fi
ansible-playbook -i "$INVENTORY_FILE" "$PLAYBOOK_FILE"