Wire up the SSH passthrough
This commit is contained in:
parent
291175340e
commit
0cc68fea6d
@ -41,7 +41,19 @@
|
||||
- "https:443:3000"
|
||||
state: present
|
||||
|
||||
- name: Ensure jq package is installed
|
||||
apt:
|
||||
name: jq
|
||||
state: present
|
||||
|
||||
- name: Retrieve application container IP address
|
||||
shell: "dokku ps:inspect gitea | jq .[0].NetworkSettings.IPAddress"
|
||||
register: dokku_container_ip
|
||||
|
||||
- name: Symlink the authorized keys configuration
|
||||
vars:
|
||||
ssh_listen_port: "{{ ssh_listen_port }}"
|
||||
dokku_container_ip: "{{ dokku_container_ip }}"
|
||||
file:
|
||||
src: /var/lib/gitea/git/.ssh/authorized_keys
|
||||
dest: /home/git/.ssh/authorized_keys
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/bin/sh
|
||||
ssh -p $GIT_SSH_PORT -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
||||
ssh -p {{ ssh_listen_port }} -o StrictHostKeyChecking=no git@{{ dokku_container_ip }} "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
||||
|
Reference in New Issue
Block a user