second attempt at fixing deploy script
Some checks failed
Ansible Deploy / deploy (Ansible/cloudflare-dns.yml) (push) Failing after 5s
Ansible Deploy / deploy (Ansible/debian.yml) (push) Failing after 4s
Ansible Deploy / deploy (Ansible/heartbeat.yml) (push) Failing after 3s
Ansible Deploy / deploy (Ansible/openssh.yml) (push) Failing after 3s
Ansible Lint / build (push) Successful in 1m11s

This commit is contained in:
Benjamin Hays 2024-10-12 18:56:37 -04:00
parent e620667ee1
commit 2b4418bdf1

View File

@ -3,6 +3,8 @@ on: [push]
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
RUNNER_TOOL_CACHE: /toolcache
strategy: strategy:
matrix: matrix:
playbook: playbook:
@ -11,7 +13,14 @@ jobs:
- Ansible/heartbeat.yml - Ansible/heartbeat.yml
- Ansible/debian.yml - Ansible/debian.yml
steps: steps:
- name: Copy SSH Key
run: |
mkdir ~/.ssh/
echo '${{secrets.SSH_PRIVATE_KEY}}' > ~/.ssh/id_rsa
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Ansible - name: Install Ansible
run: | run: |
@ -26,17 +35,12 @@ jobs:
- name: Run playbook - name: Run playbook
uses: dawidd6/action-ansible-playbook@v2 uses: dawidd6/action-ansible-playbook@v2
with: with:
# Required, playbook filepath
playbook: ${{ matrix.playbook }} playbook: ${{ matrix.playbook }}
# Optional, directory where playbooks live
directory: ./ directory: ./
# Optional, SSH private key
key: ${{secrets.SSH_PRIVATE_KEY}} key: ${{secrets.SSH_PRIVATE_KEY}}
vault_password: ${{secrets.VAULT_PASSWORD}} vault_password: ${{secrets.VAULT_PASSWORD}}
# Optional, galaxy requirements filepath
# requirements: requirements.yaml # requirements: requirements.yaml
options: | options: |
--inventory Ansible/inventory.ini --inventory Ansible/inventory.ini