From d4e799d6362906b88cd499fd1bfbff7b9650fa02 Mon Sep 17 00:00:00 2001 From: Sho Ishida Date: Mon, 20 Jul 2026 10:26:37 +0000 Subject: [PATCH] Allow SSH connections to Gitea --- .gitea/workflows/gitops.yaml | 1 + ansible/playbooks/templates/app.ini.j2 | 1 + ansible/playbooks/templates/gitea.service.j2 | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/gitops.yaml b/.gitea/workflows/gitops.yaml index ea90db3..7fb02ae 100644 --- a/.gitea/workflows/gitops.yaml +++ b/.gitea/workflows/gitops.yaml @@ -27,4 +27,5 @@ jobs: run: | cd ansible echo "dummy" > .vault_pass + ansible-galaxy collection install ansible.posix ansible-lint playbooks/*.yml diff --git a/ansible/playbooks/templates/app.ini.j2 b/ansible/playbooks/templates/app.ini.j2 index b0bbaff..345170d 100644 --- a/ansible/playbooks/templates/app.ini.j2 +++ b/ansible/playbooks/templates/app.ini.j2 @@ -15,6 +15,7 @@ HTTP_PORT = 3000 ROOT_URL = http://172.30.1.80:3000/ DISABLE_SSH = false SSH_PORT = 2222 +START_SSH_SERVER = true LFS_START_SERVER = true [security] diff --git a/ansible/playbooks/templates/gitea.service.j2 b/ansible/playbooks/templates/gitea.service.j2 index 48f9b5a..e4c1af7 100644 --- a/ansible/playbooks/templates/gitea.service.j2 +++ b/ansible/playbooks/templates/gitea.service.j2 @@ -11,7 +11,7 @@ WorkingDirectory=/home/{{ admin_user }}/containers/gitea ExecStartPre=-/usr/bin/podman rm -f gitea ExecStart=/usr/bin/podman run --name gitea --rm \ -p 3000:3000 \ - -p 2222:22 \ + -p 2222:2222 \ -v /home/{{ admin_user }}/containers/gitea/data:/var/lib/gitea:z,U \ -v /home/{{ admin_user }}/containers/gitea/config:/etc/gitea:z,U \ -e GITEA__security__INSTALL_LOCK=true \