Add authorized_keys check

This commit is contained in:
Luke Murphy 2020-03-23 20:03:54 +01:00
parent 07b83d4835
commit 795a1afb6e
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 9 additions and 0 deletions

View File

@ -63,6 +63,15 @@
force: 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
file:
src: /var/lib/gitea/git/.ssh/authorized_keys