aboutsummaryrefslogtreecommitdiffstats
path: root/roles/git/tasks/cgit.yml
blob: 3362d2cbd0e3c5a355826cde0a74da4731f51add (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
42
43
44

- name: Install cgit package and deps (fcgi stuff)
  apt: pkg={{ item }} state=installed
  with_items:
    - cgit
    - fcgiwrap
    - spawn-fcgi
  tags:
    - dependencies

- name: Copy cgitrc
  template: src=etc_cgitrc.j2 dest=/etc/cgitrc
            group=www-data
            owner=root

- name: Create static files directory
  file: path=/srv/http/cgit
        state=directory
        owner=www-data
        group=www-data
        mode=0775
        recurse=yes

- name: Upload Custom cgit Static Files (css, robots.txt, logo, etc)
  copy: src={{ item.src }} dest={{ item.dest }}
            group=www-data
            owner=root
  with_items:
    - { src: 'robots.txt',  dest: '/srv/http/cgit/robots.txt'   }
    - { src: 'cgit.png',    dest: '/srv/http/cgit/cgit.png'     }
    - { src: 'cgit.css',    dest: '/srv/http/cgit/cgit.css'     }
    - { src: 'favicon.ico', dest: '/srv/http/cgit/favicon.ico'  }

- name: Configure the nginx HTTP server for cgit
  template: src=etc_nginx_sites-available_cgit.j2
            dest=/etc/nginx/sites-available/cgit
            group=root
            owner=root

- name: Create symlink to enable cgit config
  file: state=link
        src=/etc/nginx/sites-available/cgit
        dest=/etc/nginx/sites-enabled/cgit
  notify: nginx reload