diff --git a/ansible/post-deploy.yml b/ansible/post-deploy.yml index 3412be2..23d9165 100644 --- a/ansible/post-deploy.yml +++ b/ansible/post-deploy.yml @@ -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