[deploy-all] testing stuff
Infrastructure / Check and run Ansbile playbooks (push) Successful in 1m35s Details

This commit is contained in:
Gleb Koval 2023-09-02 22:40:18 +01:00
parent d46e074ab1
commit 8aa40d27de
Signed by: cyclane
GPG Key ID: 15E168A8B332382C
1 changed files with 18 additions and 14 deletions

View File

@ -46,18 +46,22 @@ jobs:
with:
files: infra/**-playbook.yaml
- name: Run changed playbooks
if: env.DEPLOY == 'some'
env:
PROXMOX_HOST: ${{ secrets.PROXMOX_HOST }}
PROXMOX_TOKEN_ID: ${{ secrets.PROXMOX_TOKEN_ID }}
PROXMOX_TOKEN_SECRET: ${{ secrets.PROXMOX_TOKEN_SECRET }}
run: ansible-playbook --inventory ./inventory ${{ steps.files.outputs.all_changed_files }}
- name: Get playbooks
id: playbooks
if: env.DEPLOY != 'none'
run: |
if [[ "${{ env.DEPLOY }}" == "some" ]]; then
export TO_RUN="${{ steps.files.outputs.all_changed_files }}"
else
export TO_RUN="$(find . -wholename './infra/*-playbook.yaml' -type f)"
fi
echo "will run playbooks: $TO_RUN"
echo "to_run=$TO_RUN" >> "$GITHUB_OUTPUT"
- name: Run all playbooks
if: env.DEPLOY == 'all'
env:
PROXMOX_HOST: ${{ secrets.PROXMOX_HOST }}
PROXMOX_TOKEN_ID: ${{ secrets.PROXMOX_TOKEN_ID }}
PROXMOX_TOKEN_SECRET: ${{ secrets.PROXMOX_TOKEN_SECRET }}
run: ansible-playbook --inventory ./inventory $(find . -wholename "*/infra/*-playbook.yaml" -type f)
# - name: Run changed playbooks
# if: env.DEPLOY == 'none'
# env:
# PROXMOX_HOST: ${{ secrets.PROXMOX_HOST }}
# PROXMOX_TOKEN_ID: ${{ secrets.PROXMOX_TOKEN_ID }}
# PROXMOX_TOKEN_SECRET: ${{ secrets.PROXMOX_TOKEN_SECRET }}
# run: ansible-playbook --inventory ./inventory ${{ steps.files.outputs.all_changed_files }}