aboutsummaryrefslogtreecommitdiff
path: root/roles/cgit/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/cgit/tasks/main.yml')
-rw-r--r--roles/cgit/tasks/main.yml52
1 files changed, 52 insertions, 0 deletions
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml
new file mode 100644
index 0000000..15516d4
--- /dev/null
+++ b/roles/cgit/tasks/main.yml
@@ -0,0 +1,52 @@
1---
2- block:
3 - name: Install CGit and FastCGI wrapper packages
4 community.general.apk:
5 name:
6 - cgit
7 - fcgiwrap
8 - spawn-fcgi
9 - py3-pygments
10 state: present
11
12 - name: Ensure root CGit configuration exists
13 ansible.builtin.template:
14 src: cgitrc.j2
15 dest: "/etc/cgitrc"
16 owner: root
17 group: root
18 mode: '0444'
19
20 - name: Ensure {{ instance }} CGit configuration exists
21 ansible.builtin.template:
22 src: cgitrc-instance.j2
23 dest: "/etc/cgitrc-{{ instance }}"
24 owner: root
25 group: root
26 mode: '0444'
27
28 - name: Create OpenRC init script symlink
29 ansible.builtin.file:
30 src: /etc/init.d/spawn-fcgi
31 dest: "/etc/init.d/spawn-fcgi.cgit"
32 state: link
33 owner: root
34 group: root
35
36 - name: Deploy spawn-fcgi configuration
37 ansible.builtin.template:
38 src: spawn-fcgi.cgit.j2
39 dest: "/etc/conf.d/spawn-fcgi.cgit"
40 owner: root
41 group: root
42 mode: '0444'
43 notify: Restart spawn-fcgi.cgit
44
45 - name: Ensure spawn-fcgi.git is started and enabled
46 ansible.builtin.service:
47 name: "spawn-fcgi.cgit"
48 state: started
49 enabled: true
50
51 tags:
52 - cgit