|
@@ -0,0 +1,29 @@
|
|
1
|
+- name: Create gitolite group
|
|
2
|
+ group: name=git state=present
|
|
3
|
+
|
|
4
|
+- name: Create gitolite user
|
|
5
|
+ user: name=git state=present home=/home/git system=yes group=git
|
|
6
|
+
|
|
7
|
+- name: Add www-data to the git group
|
|
8
|
+ user: name=www-data groups=git append=yes
|
|
9
|
+
|
|
10
|
+- name: Install gitolite3 package
|
|
11
|
+ apt: pkg=gitolite3 state=installed
|
|
12
|
+
|
|
13
|
+- name: Copy .gitolite.rc file
|
|
14
|
+ copy: src=home_git_.gitolite.rc
|
|
15
|
+ dest=/home/git/.gitolite.rc
|
|
16
|
+ group=git
|
|
17
|
+ owner=git
|
|
18
|
+ mode=0644
|
|
19
|
+
|
|
20
|
+- name: Copy SSH public key to server
|
|
21
|
+ copy: src=gitolite.pub
|
|
22
|
+ dest=/home/git/{{ main_user_name }}.pub
|
|
23
|
+ group=git
|
|
24
|
+ owner=git
|
|
25
|
+ mode=0644
|
|
26
|
+
|
|
27
|
+- name: Setup gitolite
|
|
28
|
+ command: su - git -c 'gitolite setup -pk {{ main_user_name }}.pub'
|
|
29
|
+ chdir=/home/git
|