From 22da4bda9f020982c992f0e53a266899050e6488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Fernandes?= Date: Sat, 2 Nov 2024 22:03:19 +0000 Subject: [PATCH] git workflow ansible inventory file --- .actrc | 2 +- .gitea/workflows/host.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.actrc b/.actrc index b3ffe22..64cdc44 100644 --- a/.actrc +++ b/.actrc @@ -1,2 +1,2 @@ --P vlan-casa_continous-deploy=git.limbosolutions.com/kb/gitea/act-runner_ansible:0.2.11-dev +-P vlan-casa_continous-deploy=git.limbosolutions.com/kb/gitea/act-runner_ansible:0.2.11 -W .gitea \ No newline at end of file diff --git a/.gitea/workflows/host.yml b/.gitea/workflows/host.yml index 308dea0..c2b4d51 100644 --- a/.gitea/workflows/host.yml +++ b/.gitea/workflows/host.yml @@ -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: |