Minor cleanup
This commit is contained in:
@@ -15,4 +15,4 @@ gitea_dbname: "{{ gitea_name }}"
|
||||
gitea_dbuser: "{{ gitea_name }}"
|
||||
|
||||
# host
|
||||
gitea_root: "{{ docker_root }}/{{ gitea_name }}"
|
||||
gitea_root: "{{ docker_compose_root }}/{{ gitea_name }}"
|
||||
|
@@ -46,16 +46,22 @@
|
||||
src: /home/git/.ssh/id_rsa.pub
|
||||
register: git_rsapub
|
||||
|
||||
- name: Get stats on git's authorized_keys file
|
||||
stat:
|
||||
path: /home/git/.ssh/authorized_keys
|
||||
register: git_authkeys
|
||||
|
||||
- name: Create git's authorized_keys file
|
||||
file:
|
||||
path: /home/git/.ssh/authorized_keys
|
||||
state: touch
|
||||
when: not git_authkeys.stat.exists
|
||||
|
||||
- name: Add git's public SSH key to authorized_keys
|
||||
lineinfile:
|
||||
path: /home/git/.ssh/authorized_keys
|
||||
regex: "^ssh-rsa"
|
||||
line: "{{ git_rsapub['content'] | b64decode }}"
|
||||
insertbefore: BOF
|
||||
|
||||
- name: Create Gitea host script for SSH
|
||||
template:
|
||||
|
Reference in New Issue
Block a user