Add authorized_keys check
This commit is contained in:
parent
07b83d4835
commit
795a1afb6e
@ -63,6 +63,15 @@
|
|||||||
force: true
|
force: true
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Set authorized keys for git user
|
||||||
|
authorized_key:
|
||||||
|
user: git
|
||||||
|
state: present
|
||||||
|
key: "{{ lookup('file', '/home/git/.ssh/id_rsa.pub') }}"
|
||||||
|
path: /var/lib/gitea/git/.ssh/authorized_keys
|
||||||
|
manage_dir: false
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Symlink the authorized keys configuration
|
- name: Symlink the authorized keys configuration
|
||||||
file:
|
file:
|
||||||
src: /var/lib/gitea/git/.ssh/authorized_keys
|
src: /var/lib/gitea/git/.ssh/authorized_keys
|
||||||
|
Reference in New Issue
Block a user