Setup SSH passthrough script
This commit is contained in:
parent
f873a3839a
commit
f135bb1202
@ -47,6 +47,24 @@
|
|||||||
ssh_key_file: .ssh/id_rsa
|
ssh_key_file: .ssh/id_rsa
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Create SSH passthrough directories
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
owner: gitea
|
||||||
|
group: gitea
|
||||||
|
with_items:
|
||||||
|
- /app
|
||||||
|
- /app/gitea
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Setup the SSH passthrough
|
||||||
|
template:
|
||||||
|
src: gitea.j2
|
||||||
|
dest: /app/gitea/gitea
|
||||||
|
owner: gitea
|
||||||
|
group: gitea
|
||||||
|
|
||||||
- name: Get uid/guid of the gitea user
|
- name: Get uid/guid of the gitea user
|
||||||
getent:
|
getent:
|
||||||
database: passwd
|
database: passwd
|
||||||
@ -54,16 +72,6 @@
|
|||||||
split: ":"
|
split: ":"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Create volume mount configuration directories
|
|
||||||
file:
|
|
||||||
path: "{{ item }}"
|
|
||||||
state: directory
|
|
||||||
owner: dokku
|
|
||||||
group: dokku
|
|
||||||
with_items:
|
|
||||||
- /var/lib/gitea
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Specify docker volume mounts
|
- name: Specify docker volume mounts
|
||||||
dokku_storage:
|
dokku_storage:
|
||||||
app: gitea
|
app: gitea
|
||||||
|
2
ansible/templates/gitea
Executable file
2
ansible/templates/gitea
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
ssh -p $GIT_SSH_PORT -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
Reference in New Issue
Block a user