feat: seperate jobs for terraform and ansible

This commit is contained in:
Ditmar Visser
2025-06-11 19:12:05 +00:00
parent 681da6d886
commit 1ecfe1e4cb

View File

@@ -61,7 +61,25 @@ jobs:
- name: Terraform Apply
run: terraform apply -auto-approve
# Ansible
- name: Upload inventory as artifact
uses: actions/upload-artifact@v4
with:
name: ansible_inventory
path: ../ansible/inventory.ini
ansible:
name: Ansible Apply
runs-on: skylab
defaults:
run:
working-directory: ./ansible
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ansible_inventory
- name: Set up SSH
run: |
# mkdir -p ~/.ssh
@@ -83,4 +101,4 @@ jobs:
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
ANSIBLE_HOST_KEY_CHECKING: False
run: |
ansible-playbook -i ../ansible/inventory.ini ../ansible/main.yml
ansible-playbook -i inventory.ini main.yml