git workflow ansible inventory file
All checks were successful
deploy host / Deploy (push) Successful in 11s

This commit is contained in:
2024-11-02 22:03:19 +00:00
parent 662da99ef0
commit 22da4bda9f
2 changed files with 14 additions and 1 deletions

View File

@@ -15,6 +15,19 @@ jobs:
run: |
echo "${{ secrets.HOST_ANSIBLE_PRIVATE_KEY }}" > ${GITHUB_WORKSPACE}/ssh-key &&
chmod 600 ${GITHUB_WORKSPACE}/ssh-key
- name: setup Ansible Inventory file
run: |
cat >> ansible/inventory.yml << 'END'
all:
hosts:
homesrv01:
ansible_host: ${{secrets.HOST_ANSIBLE_HOST}}
ansible_user: ${{secrets.HOST_ANSIBLE_REMOTE_USER }}
ansible_become_pass: "${{secrets.HOST_ANSIBLE_BECOME_PASS}}"
END
- name: Run Ansible Playbook
run: |