diff --git a/.actrc b/.actrc new file mode 100644 index 0000000..b3ffe22 --- /dev/null +++ b/.actrc @@ -0,0 +1,2 @@ +-P vlan-casa_continous-deploy=git.limbosolutions.com/kb/gitea/act-runner_ansible:0.2.11-dev +-W .gitea \ No newline at end of file diff --git a/.gitea/workflows/host.yml b/.gitea/workflows/host.yml index 33e5dcc..308dea0 100644 --- a/.gitea/workflows/host.yml +++ b/.gitea/workflows/host.yml @@ -6,28 +6,22 @@ on: - ".gitea/workflows/**host**.yml" jobs: Deploy: - runs-on: "homesrv-deploy" + runs-on: "vlan-casa_continous-deploy" steps: - name: Checkout code uses: actions/checkout@v2 - - name: setup ssh run: | echo "${{ secrets.HOST_ANSIBLE_PRIVATE_KEY }}" > ${GITHUB_WORKSPACE}/ssh-key && chmod 600 ${GITHUB_WORKSPACE}/ssh-key - name: Run Ansible Playbook - run: | - docker run --rm \ - -e ANSIBLE_PRIVATE_KEY_FILE="${GITHUB_WORKSPACE}/ssh-key" \ - -e ANSIBLE_REMOTE_USER="${{ secrets.HOST_ANSIBLE_REMOTE_USER }}" \ - -e ANSIBLE_INVENTORY="${{ secrets.HOST_ANSIBLE_INVENTORY }}" \ - -e ANSIBLE_PROJECT_DIR="${GITHUB_WORKSPACE}/ansible" \ - -e ANSIBLE_HOST_KEY_CHECKING=false \ - -e ANSIBLE_BECOME_PASS=${{ secrets.HOST_ANSIBLE_BECOME_PASS }} \ - --volumes-from ${{ env.JOB_CONTAINER_NAME }} \ - git.limbosolutions.com/kb/ansible \ + run: | + cd ${GITHUB_WORKSPACE} + export ANSIBLE_HOST_KEY_CHECKING=False; ansible-playbook ansible/site.yml --private-key ${GITHUB_WORKSPACE}/ssh-key + + diff --git a/.gitea/workflows/services.nginx.yml b/.gitea/workflows/services.nginx.yml index ebc954a..4be916f 100644 --- a/.gitea/workflows/services.nginx.yml +++ b/.gitea/workflows/services.nginx.yml @@ -6,7 +6,7 @@ on: - ".gitea/workflows/**nginx**.yml" jobs: deploy: - runs-on: "homesrv-deploy" + runs-on: "vlan-casa_continous-deploy" steps: - name: Portainer stack nginx webhook run: | diff --git a/.gitea/workflows/services.wyoming.yml b/.gitea/workflows/services.wyoming.yml index cb2c5dc..e828664 100644 --- a/.gitea/workflows/services.wyoming.yml +++ b/.gitea/workflows/services.wyoming.yml @@ -6,8 +6,8 @@ on: - ".gitea/workflows/**wyoming**.yml" jobs: deploy: - runs-on: "homesrv-deploy" + runs-on: "vlan-casa_continous-deploy" steps: - name: Portainer stack wyoming webhook run: | - curl -X POST "${{secrets.PORTAINER_WYOMING_WEBHOOK_URL}}" \ No newline at end of file + curl -X POST "${{secrets.PORTAINER_WYOMING_WEBHOOK_URL}}" --insecure \ No newline at end of file diff --git a/.gitea/workflows/services.zigbee2mqtt.yml b/.gitea/workflows/services.zigbee2mqtt.yml index 07e9c37..d6dd7a7 100644 --- a/.gitea/workflows/services.zigbee2mqtt.yml +++ b/.gitea/workflows/services.zigbee2mqtt.yml @@ -6,7 +6,7 @@ on: - ".gitea/workflows/**zigbee2mqtt**.yml" jobs: deploy: - runs-on: "homesrv-deploy" + runs-on: "vlan-casa_continous-deploy" steps: - name: Portainer stack zigbee2mqtt webhook run: | diff --git a/.gitignore b/.gitignore index dc16250..6e5daff 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ services/zigbee2mqtt/volumes/* .vscode/settings.json gitignore/* **.local +.secrets ansible/inventory.yml