aboutsummaryrefslogtreecommitdiff
path: root/infrastructure/roles/git/tasks
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2026-01-10 18:43:45 +0100
committeralex <alex@pdp7.net>2026-01-10 18:43:45 +0100
commitaeba2c5c63c58b5c357546b13cb675e67c823568 (patch)
treeef4d04002574e43f2c6b04b550a45ba1f96ec45a /infrastructure/roles/git/tasks
parenta060a8b8fafcdfcc49dd2da37cd364afd9d0702e (diff)
WIP: replace gitweb with cgit
Diffstat (limited to 'infrastructure/roles/git/tasks')
-rw-r--r--infrastructure/roles/git/tasks/main.yaml29
1 files changed, 28 insertions, 1 deletions
diff --git a/infrastructure/roles/git/tasks/main.yaml b/infrastructure/roles/git/tasks/main.yaml
index ba39e05..8c8f2e5 100644
--- a/infrastructure/roles/git/tasks/main.yaml
+++ b/infrastructure/roles/git/tasks/main.yaml
@@ -2,9 +2,36 @@
ansible.builtin.package:
name:
- git
- - gitweb
+ - cgit
- name: enable cgid
ansible.builtin.command:
cmd: a2enmod cgid
creates: /etc/apache2/mods-enabled/cgid.load
notify: restart web
+- name: configure cgit
+ ansible.builtin.copy:
+ content: |
+ #
+ # cgit config
+ # see cgitrc(5) for details
+
+ css=/cgit-css/cgit.css
+ logo=/cgit-css/cgit.png
+
+ scan-path=/srv/repos
+ dest: /etc/cgitrc
+- name: create repository directory
+ ansible.builtin.file:
+ path: /srv/repos/
+ state: directory
+ owner: nobody
+ group: www-data
+- name: create user repository directories
+ ansible.builtin.file:
+ path: "/srv/repos/{{ item.name }}"
+ state: directory
+ owner: "{{ item.name }}"
+ group: "{{ item.name }}"
+ loop: "{{ users }}"
+ loop_control:
+ label: "{{ item.name }}"