nixos-base-image/scripts/run_ansible_ci.sh
plasmagoat 840c1ad956
All checks were successful
Build & Upload NixOS Proxmox Image / Build NixOS Base Image (push) Successful in 2m2s
Build & Upload NixOS Proxmox Image / Release Image (push) Successful in 6s
versions
2025-06-09 23:20:20 +02:00

24 lines
648 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
echo "Starting Ansible CI/CD run..."
# --- 2. Navigate to the Ansible directory ---
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
ANSIBLE_DIR="${SCRIPT_DIR}/../ansible"
if [[ ! -d "${ANSIBLE_DIR}" ]]; then
echo "Error: Ansible directory not found at ${ANSIBLE_DIR}"
exit 1
fi
cd "${ANSIBLE_DIR}"
echo "Changed directory to: $(pwd)"
ansible-playbook upload-template.yml \
--inventory inventory/hosts.yml \
-e "version=${IMAGE_VERSION:-v0.0.0}" # \
# --diff \
# --check false # Set to true for a dry run, false for actual execution
echo "Ansible playbook execution finished."