feat: seperate jobs for terraform and ansible
This commit is contained in:
@@ -61,7 +61,25 @@ jobs:
|
|||||||
- name: Terraform Apply
|
- name: Terraform Apply
|
||||||
run: terraform apply -auto-approve
|
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
|
- name: Set up SSH
|
||||||
run: |
|
run: |
|
||||||
# mkdir -p ~/.ssh
|
# mkdir -p ~/.ssh
|
||||||
@@ -83,4 +101,4 @@ jobs:
|
|||||||
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
|
ANSIBLE_USER: ${{ secrets.ANSIBLE_USER }}
|
||||||
ANSIBLE_HOST_KEY_CHECKING: False
|
ANSIBLE_HOST_KEY_CHECKING: False
|
||||||
run: |
|
run: |
|
||||||
ansible-playbook -i ../ansible/inventory.ini ../ansible/main.yml
|
ansible-playbook -i inventory.ini main.yml
|
||||||
|
Reference in New Issue
Block a user