diff options
Diffstat (limited to 'git-server.yaml')
-rw-r--r-- | git-server.yaml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/git-server.yaml b/git-server.yaml index d94bd24..9d612a5 100644 --- a/git-server.yaml +++ b/git-server.yaml @@ -1,6 +1,7 @@ --- - name: Setup git server hosts: raspberry + gather_facts: false tasks: - name: Install packages become: true @@ -19,15 +20,16 @@ # user - name: Create git user become: true - shell: | - useradd git -m - mkdir /home/git/.ssh + user: + name: git - - name: Copy SSH keys + - name: Add public key to authorized_keys become: true - copy: - src: ~/.ssh/id_rsa.pub - dest: /home/git/.ssh/authorized_keys + authorized_key: + user: git + state: present + key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}" + # nginx - name: Copy nginx configuration |