Browse code

Allow user created repos

Robert Cranston authored on 17/11/2019 10:58:09
Showing 2 changed files

... ...
@@ -3,7 +3,8 @@
3 3
 An [Ansible][] [role][] for deploying [gitolite][] on [Debian][] >=9.
4 4
 
5 5
 Installs [gitolite][], creates a [dedicated user][] to run it (defaults to
6
-`git`), and prepares for [administering gitolite directly on the server][].
6
+`git`), prepares for [administering gitolite directly on the server][], and
7
+allows [user created repos][].
7 8
 
8 9
 [`ansible-role-gitolite`]: https://git.rcrnstn.net/rcrnstn/ansible-role-gitolite
9 10
 [Ansible]: https://docs.ansible.com/ansible
... ...
@@ -12,6 +13,7 @@ Installs [gitolite][], creates a [dedicated user][] to run it (defaults to
12 13
 [Debian]: https://www.debian.org
13 14
 [dedicated user]: https://gitolite.com/gitolite/concepts#the-hosting-user
14 15
 [administering gitolite directly on the server]: https://gitolite.com/gitolite/odds-and-ends#administering-gitolite-directly-on-the-server
16
+[user created repos]: https://gitolite.com/gitolite/odds-and-ends#giving-users-their-own-repos
15 17
 
16 18
 ## Try out
17 19
 
... ...
@@ -58,3 +58,14 @@
58 58
         src: "gitolite.rc"
59 59
         dest: "{{ gitolite_user_home }}/.gitolite.rc"
60 60
       notify: 'gitolite compile'
61
+
62
+    - name: "Allow user created repos"
63
+      blockinfile:
64
+        path: "{{ gitolite_user_home }}/.gitolite/conf/gitolite.conf"
65
+        marker: "# {mark} User created repos"
66
+        block: |
67
+          repo CREATOR/..*
68
+              C = @all
69
+              RW+ = CREATOR
70
+              RW = WRITERS
71
+              R = READERS