Trying Ansible actions
This commit is contained in:
6
.gitea/workflows/inventory.yml
Normal file
6
.gitea/workflows/inventory.yml
Normal 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
|
||||||
23
.gitea/workflows/pingflow.yml
Normal file
23
.gitea/workflows/pingflow.yml
Normal 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
|
||||||
Reference in New Issue
Block a user