Some checks failed
Ansible Deploy / deploy (Ansible/cloudflare-dns.yml) (push) Failing after 59s
Ansible Deploy / deploy (Ansible/heartbeat.yml) (push) Has been cancelled
Ansible Deploy / deploy (Ansible/openssh.yml) (push) Has been cancelled
Ansible Deploy / deploy (Ansible/debian.yml) (push) Has been cancelled
Ansible Lint / build (push) Successful in 1m14s
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Ansible Deploy
|
|
on: [push]
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
playbook:
|
|
- Ansible/openssh.yml
|
|
- Ansible/cloudflare-dns.yml
|
|
- Ansible/heartbeat.yml
|
|
- Ansible/debian.yml
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Ansible
|
|
run: |
|
|
apt update -y
|
|
apt install python3-pip -y
|
|
python3 -m pip install ansible
|
|
|
|
#- name: Install Ansible Galaxy requirements
|
|
# run: |
|
|
# ansible-galaxy install -r requirements.yaml
|
|
|
|
- name: Run playbook
|
|
uses: dawidd6/action-ansible-playbook@v2
|
|
with:
|
|
# Required, playbook filepath
|
|
playbook: ${{ matrix.playbook }}
|
|
|
|
# Optional, directory where playbooks live
|
|
directory: ./Ansible/
|
|
|
|
# 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.ini |