diff --git a/ansible/pre-deploy.yml b/ansible/pre-deploy.yml index deb5094..83a1c02 100644 --- a/ansible/pre-deploy.yml +++ b/ansible/pre-deploy.yml @@ -8,6 +8,21 @@ extensions: - yml + - name: Retrieve git user ssh public key + set_fact: + git_ssh_pub_key: "{{ lookup('file', '/home/git/.ssh/id_rsa.pub') }}" + git_auth_keys: "{{ lookup('file', '/var/lib/gitea/git/.ssh/authorized_keys') }}" + become: true + + - name: TEST TEST TEST + lineinfile: + path: /var/lib/gitea/git/.ssh/authorized_keys + regexp: "^{{ git_ssh_pub_key }}" + line: "{{ git_ssh_pub_key }}{{ git_auth_keys }}" + state: present + create: true + become: true + - name: Configure git.autonomic.zone domain dokku_domains: app: gitea