blob: 405f8f0e45949b1a1ea1a5a183dfcae019a82f6d (
plain)
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
34
35
36
37
38
39
40
41
|
- name: install git
ansible.builtin.package:
name:
- git
- cgit
- python3-markdown
- 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
about-filter=/usr/lib/cgit/filters/about-formatting.sh
readme=:README.md
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 }}"
|