Trying Ansible actions

This commit is contained in:
2023-11-17 23:05:52 +02:00
parent f03af21605
commit 69aa1b6903
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
all:
hosts:
takahe:
ansible_host: 192.168.0.66
ansible_user: shmick
ansible_ssh_private_key_file: /home/shmick/.ssh/id_ed25519

View File

@@ -0,0 +1,23 @@
name: Ansible Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Run Ansible Playbook
run: |
docker pull ubuntu
docker run \
-v ${{ gitea.workspace }}:/runner/project \
-w /runner/project \
ubuntu \
ansible-playbook -i inventory.yml ping.yml