aboutsummaryrefslogtreecommitdiff
blob: 872a43a5ca6add64acfb18f81aef1bf1aaeee458 (plain) (blame)
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 cgit, Nginx
  pkgng:
    state: present
    name:
      - cgit
      - nginx
      - fcgiwrap
      - security/py-certbot-nginx

- name: Create git directory
  file:
    path: /opt/git
    state: directory
    owner: www
    group: www
    recurse: yes

- name: Create Nginx conf directory
  file:
    path: /usr/local/etc/nginx/conf.d
    state: directory
    recurse: yes

- name: Render nginx config file
  template:
    src: nginx.conf.j2
    dest: "/usr/local/etc/nginx/nginx.conf"
    mode: 0644

- name: Render nginx config file
  template:
    src: cgit.conf.j2
    dest: "/usr/local/etc/nginx/conf.d/cgit.conf"
    mode: 0644

# TODO
# create certbot https certificate
# test nginx conf
# reload nginx conf
# create git user
# git user permission
Powered by cgit v1.2.3 (git 2.41.0)