blob: 8c8f2e565962e64230b3c6aa7597bafc4f2b2b80 (
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
|
- name: install git
ansible.builtin.package:
name:
- git
- 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 }}"
|