summaryrefslogtreecommitdiffstats
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.yml46
1 files changed, 46 insertions, 0 deletions
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml
new file mode 100644
index 0000000..9e1d47e
--- /dev/null
+++ b/roles/cgit/tasks/main.yml
@@ -0,0 +1,46 @@
+---
+
+- name: Install cgit and dependencies
+ package:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - cgit
+ - fcgiwrap
+ - python-pygments
+ - python-markdown
+ - python-docutils
+
+- name: Append git group to http user
+ user:
+ name: "http"
+ groups: "git"
+ append: yes
+ notify:
+ - restart fcgiwrap
+
+- name: Enable fcgiwrap
+ service:
+ name: fcgiwrap.socket
+ state: started
+ enabled: yes
+ notify:
+ - restart fcgiwrap
+
+- name: Copy configuration from template
+ template:
+ src: cgitrc.j2
+ dest: /etc/cgitrc
+ mode: 0644
+ owner: "root"
+ group: "root"
+
+- name: Copy nginx conf file
+ template:
+ src: cgit_nginx.conf.j2
+ dest: /etc/nginx/nginx.d/cgit.conf
+ mode: 0644
+ owner: "root"
+ group: "root"
+ notify:
+ - reload nginx