Compare commits

...

70 Commits

Author SHA1 Message Date
d1093834fb .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:57:18 +01:00
07e34529a5 . 2024-09-05 22:55:16 +01:00
fa9a8e67e9 .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:54:17 +01:00
e5aa21e3d5 .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:53:15 +01:00
2ee7121c08 .
Some checks failed
deploy host / Deploy (push) Failing after 5s
2024-09-05 22:52:52 +01:00
042fc295de .
Some checks failed
deploy host / Deploy (push) Failing after 5s
2024-09-05 22:52:26 +01:00
08f6d60046 .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:52:01 +01:00
a70a5cf420 .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 22:51:33 +01:00
1983102d01 .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:50:01 +01:00
56bd7bca4a .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:48:06 +01:00
c3a3db9a5b .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:47:01 +01:00
0b3c8564db .
All checks were successful
deploy host / Deploy (push) Successful in 8s
2024-09-05 22:45:24 +01:00
66e93a72d0 .
Some checks failed
deploy host / Deploy (push) Failing after 5s
2024-09-05 22:43:02 +01:00
620106ef60 .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 22:42:32 +01:00
88f9289665 .
All checks were successful
deploy host / Deploy (push) Successful in 5s
2024-09-05 22:41:39 +01:00
a426a35f86 .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 22:40:56 +01:00
8325fff602 .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:38:05 +01:00
94ea5525f5 .
All checks were successful
deploy host / Deploy (push) Successful in 8s
2024-09-05 22:37:07 +01:00
6ac89218fd .
All checks were successful
deploy host / Deploy (push) Successful in 9s
2024-09-05 22:35:53 +01:00
79cb5c6fd5 modified: .gitea/workflows/host.yml
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:35:07 +01:00
2be358ff98 .
All checks were successful
deploy host / Deploy (push) Successful in 8s
2024-09-05 22:32:25 +01:00
34a918ec8c .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 22:27:35 +01:00
d7b2e561cc .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 22:26:27 +01:00
c27fa22928 .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:25:49 +01:00
4fd23a5d8c .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:25:11 +01:00
36b82c9038 .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 22:24:08 +01:00
3f5d52a5fa ,
All checks were successful
deploy host / Deploy (push) Successful in 14s
2024-09-05 22:23:16 +01:00
933e774c7e .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:20:38 +01:00
11cea9b6fc modified: .gitea/workflows/host.yml
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:18:22 +01:00
9f9a390765 .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:16:38 +01:00
7eb254da2f .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:10:42 +01:00
e7b1181dab .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:09:52 +01:00
129e1836d4 .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:08:46 +01:00
4ea6e35522 .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:07:30 +01:00
6d9a1fd947 .
Some checks failed
deploy host / Deploy (push) Failing after 5s
2024-09-05 22:06:35 +01:00
8d0f2c181a .
Some checks failed
deploy host / Deploy (push) Failing after 5s
2024-09-05 22:06:07 +01:00
d7c41dd3cb .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 22:03:28 +01:00
260ae62e59 .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 22:01:48 +01:00
bccf153db0 .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 21:59:55 +01:00
66e09df419 modified: .gitea/workflows/host.yml
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 21:57:39 +01:00
edde01efb5 .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 21:55:28 +01:00
ab7f0b2e97 .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 21:54:40 +01:00
fba35ce3bc . 2024-09-05 21:51:39 +01:00
631ff376e5 .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 21:39:52 +01:00
ca14c75897 modified: .gitea/workflows/host.yml
Some checks failed
deploy host / Deploy (push) Failing after 5s
2024-09-05 21:38:50 +01:00
86ba316bdc .
Some checks failed
deploy host / Deploy (push) Failing after 5s
2024-09-05 21:37:44 +01:00
a739a72f4a .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 21:36:16 +01:00
5dda1e9135 . 2024-09-05 21:36:00 +01:00
9455ef9d80 .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 21:22:54 +01:00
1193a81fb0 .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 21:21:46 +01:00
f5a368e3f8 .
Some checks failed
deploy host / Deploy (push) Failing after 5s
2024-09-05 21:21:12 +01:00
b2cae5fb94 .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 21:18:04 +01:00
2a5f3c14ee .
All checks were successful
deploy host / Deploy (push) Successful in 9s
2024-09-05 21:17:09 +01:00
d793e8781c .
All checks were successful
deploy host / Deploy (push) Successful in 1m42s
2024-09-05 21:00:15 +01:00
7a2ac916c9 ..
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-05 20:58:20 +01:00
56cd2c69af .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 20:54:00 +01:00
a7d600c84d .
All checks were successful
deploy host / Deploy (push) Successful in 7s
2024-09-05 20:41:32 +01:00
f9bc6ae967 .
Some checks failed
deploy host / Deploy (push) Failing after 6s
2024-09-05 20:38:54 +01:00
b4768c784f .
Some checks failed
deploy host / Deploy (push) Failing after 2m34s
2024-09-05 20:22:58 +01:00
79e4d6cd47 .
Some checks failed
deploy host / Deploy (push) Failing after 26s
2024-09-05 20:21:36 +01:00
7df12159ea .
Some checks failed
deploy host / Deploy (push) Failing after 40s
2024-09-05 20:20:23 +01:00
dcff1e3c7f .
Some checks failed
deploy host / Deploy (push) Failing after 2m3s
2024-09-05 20:14:03 +01:00
baff515fd5 .
All checks were successful
deploy host / Deploy (push) Successful in 16s
2024-09-05 20:12:14 +01:00
54d5fc1c92 modified: .gitea/workflows/host.yml
Some checks failed
deploy host / Deploy (push) Failing after 2s
2024-09-05 20:10:58 +01:00
24edd39cf3 modified: .gitea/workflows/host.yml
Some checks failed
deploy host / Deploy (push) Failing after 15s
2024-09-05 19:49:53 +01:00
14b46c5ced .
Some checks failed
deploy host / Deploy (push) Failing after 2s
2024-09-05 19:38:57 +01:00
776c2b3706 .
Some checks failed
deploy host / Deploy (push) Failing after 9s
2024-09-05 08:57:19 +01:00
abbad37871 .
Some checks failed
deploy host / Deploy (push) Failing after 15s
2024-09-05 08:53:14 +01:00
25802094a5 some tests 2024-09-04 00:55:09 +01:00
39e5d5a855 .
All checks were successful
deploy host / Deploy (push) Successful in 6s
2024-09-03 22:15:37 +01:00
5 changed files with 53 additions and 19 deletions

View File

@@ -1,30 +1,34 @@
name: deploy host
on:
push:
paths:
- "ansible/**"
- ".gitea/workflows/**host**.yml"
# paths:
# - "ansible/**"
# - ".gitea/workflows/**host**.yml"
jobs:
Deploy:
runs-on: "homesrv-deploy"
container:
image: git.limbosolutions.com/kb/ubuntu:act-latest
# - data
# - /src/*.json
steps:
- name: Checkout code
uses: actions/checkout@v2
# - name: Set up SSH
- name: ls
run: ls -lah ${GITHUB_WORKSPACE}
# - name: Run Ansible Playbook
# run: |
# echo "${{secrets.SSH_PRIVATE_KEY}}" > private_key.pem
# chmod 600 private_key.pem
#
# - name: Ansible Playbook
# env:
# ANSIBLE_HOST_KEY_CHECKING: False
# ANSIBLE_BECOME_PASS: ${{secrets.ANSIBLE_BECOME_PASS}}
# run: |
# ansible-playbook -i ${{secrets.SERVER_ADDRESS}}, ${{gitea.workspace}}/ansible/site.yml --private-key private_key.pem -u ${{secrets.ANSIBLE_USER}}
# docker run --rm --volumes-from ${{ env.JOB_CONTAINER_NAME }} ubuntu:latest ls -lah ${GITHUB_WORKSPACE}; code-server
- name: Run Ansible Playbook
run: |
docker run --rm \
-e ANSIBLE_PLAYBOOK_PRIVATE_KEY="${{ secrets.HOST_ANSIBLE_PRIVATE_KEY }}" \
-e ANSIBLE_PLAYBOOK_REMOTE_USER="${{ secrets.HOST_ANSIBLE_REMOTE_USER }}" \
-e ANSIBLE_PLAYBOOK_INVENTORY="${{ secrets.HOST_ANSIBLE_REMOTE_ADDRESS }}" \
-e ANSIBLE_PLAYBOOK_WORKSPACE_PATH=${GITHUB_WORKSPACE}/ansible \
--volumes-from ${{ env.JOB_CONTAINER_NAME }} \
--entrypoint "/bin/bash" \
git.limbosolutions.com/kb/ansible-playbook:dev -c "ls -lah" /

2
.gitignore vendored
View File

@@ -6,3 +6,5 @@ lib2/*
services/zigbee2mqtt/volumes/*
*.env
.vscode/settings.json
gitignore/*
**.local

View File

@@ -0,0 +1,8 @@
docker image pull git.limbosolutions.com/kb/ansible
docker run --rm \
-v ${PWD}/scripts:/scripts \
-v ${PWD}/workspace:/workspace \
-v ${MY_ANSIBLE_PRIVATE_KEY_FILE}/id_ed25519:/data/ansible_private_key \
git.limbosolutions.com/kb/ansible \
bash /scripts/run.sh

View File

@@ -0,0 +1,11 @@
#/bin/bash
source /scripts/.env.local
echo $ANSIBLE_PRIVATE_KEY > /root/ansible_private_key
source /scripts/.env.local
cd /workspace
chmod 600 /root/ansible_private_key
cat /root/ansible_private_key
export ANSIBLE_HOST_KEY_CHECKING=False
$ANSIBLE_COMMAND

View File

@@ -0,0 +1,9 @@
- name: Homesrv01 playbook
hosts: all
tasks:
- name: Ping my hosts
ansible.builtin.ping:
- name: Print message
ansible.builtin.debug:
msg: Hello world