Compare commits

...

1 commit
main ... v0.0.2

Author SHA1 Message Date
840c1ad956 versions
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
2025-06-09 23:20:20 +02:00
2 changed files with 2 additions and 32 deletions

View file

@ -104,12 +104,7 @@ jobs:
# Execute the script, passing necessary environment variables # Execute the script, passing necessary environment variables
bash scripts/run_ansible_ci.sh bash scripts/run_ansible_ci.sh
env: env:
# Provide VMIDs and names, overriding group_vars if desired. IMAGE_VERSION: ${{ steps.version.outputs.tag_name }}
# These will be passed as `--extra-vars` to Ansible.
ANSIBLE_EXTRA_VARS: >-
backup_template_vmid=${{ env.TEMPLATE_VMID | default('9001') }}
latest_template_vmid=${{ env.LATEST_TEMPLATE_VMID | default('9000') }}
version=${{ steps.version.outputs.tag_name }}
- name: Extract flake metadata - name: Extract flake metadata
id: meta id: meta

View file

@ -15,34 +15,9 @@ fi
cd "${ANSIBLE_DIR}" cd "${ANSIBLE_DIR}"
echo "Changed directory to: $(pwd)" echo "Changed directory to: $(pwd)"
# # --- 3. Define Ansible Extra Variables ---
# # Base extra variables from our static definitions
EXTRA_VARS=(
# "local_image_path_ci=${PROXMOX_LOCAL_IMAGE_PATH_FROM_BUILD}" # Path to the image file on the CI runner
# "image_filename=$(basename "${PROXMOX_LOCAL_IMAGE_PATH_FROM_BUILD}")" # Extract filename
)
# # Append any other variables passed via ANSIBLE_EXTRA_VARS from the workflow
if [[ -n "${ANSIBLE_EXTRA_VARS:-}" ]]; then
# Split by space or newline and add to array
IFS=$'\n' read -r -d '' -a ADDITIONAL_VARS <<< "${ANSIBLE_EXTRA_VARS}" || true
for var in "${ADDITIONAL_VARS[@]}"; do
EXTRA_VARS+=("${var}")
done
fi
# # --- 4. Execute the Ansible Playbook ---
# echo "Executing Ansible playbook: upload-template.yml"
# # Construct the full --extra-vars string
EXTRA_VARS_ARGS=""
for var in "${EXTRA_VARS[@]}"; do
EXTRA_VARS_ARGS+=" -e ${var}"
done
ansible-playbook upload-template.yml \ ansible-playbook upload-template.yml \
--inventory inventory/hosts.yml \ --inventory inventory/hosts.yml \
${EXTRA_VARS_ARGS} # \ -e "version=${IMAGE_VERSION:-v0.0.0}" # \
# --diff \ # --diff \
# --check false # Set to true for a dry run, false for actual execution # --check false # Set to true for a dry run, false for actual execution