1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- name: copy initial ssh-key to destination host
copy:
content: "{{ services.gitolite.initialKey }}"
dest: /var/lib/git/first-user-key.pub
owner: git
group: git
- name: Initial setup of gitolite
become: yes
become_user: git
command:
cmd: gitolite setup -pk /var/lib/git/first-user-key.pub
creates: /var/lib/git/.gitolite
- name: Unlock the git user
ignore_errors: yes
command:
cmd: passwd -u git
- name: fix gitolite.rc to set correct permissons
patch:
src: gitolite.rc.patch
dest: /var/lib/git/.gitolite.rc
- name: set permissions for git dir
file:
path: /var/lib/git
state: directory
mode: 0755
owner: git
group: git