Minor cleanup

This commit is contained in:
2022-05-27 23:14:06 -04:00
parent 330f2b5a91
commit 3a92921932
9 changed files with 12 additions and 39 deletions

View File

@@ -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: