Some checks failed
Ansible Deploy / Homelab-Deploy (ansible/buildHomelab.yaml) (push) Failing after 1m8s
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
name: Ansible Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
Homelab-Deploy:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
playbook:
|
|
- ansible/buildHomelab.yaml
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# install ansbile
|
|
- name: Install Ansible
|
|
run: |
|
|
apt update -y
|
|
apt install python3-pip -y
|
|
python -m venv .venv
|
|
source .venv/bin/activate
|
|
python3 -m pip install -r requirements.txt
|
|
|
|
- name: Run playbook
|
|
uses: dawidd6/action-ansible-playbook@v2
|
|
with:
|
|
# Required, playbook filepath
|
|
playbook: ${{ matrix.playbook }}
|
|
# Optional, directory where playbooks live
|
|
directory: ./
|
|
# Optional, SSH private key
|
|
key: ${{secrets.SSH_PRIVATE_KEY}}
|
|
vault_password: ${{secrets.VAULT_PASSWORD}}
|
|
# Optional, galaxy requirements filepath
|
|
#requirements: requirements.yaml
|
|
options: |
|
|
--inventory ansible/inventory.yaml
|