diff options
author | clarkzjw <[email protected]> | 2023-01-20 10:21:10 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-01-20 10:21:10 -0800 |
commit | f1aebe3adc2b68f240d9118ae95e9ff93671ab66 (patch) | |
tree | b4ea255d648c37bf5f797c4a126224caa51209ac /clarkzjw.cc/config/bia/ansible/roles/cgit/tasks | |
parent | 1fce024be20034ad4eef7646594eef0fbcc1b64e (diff) | |
download | homelab-f1aebe3adc2b68f240d9118ae95e9ff93671ab66.tar.gz |
bia: add nginx
Diffstat (limited to 'clarkzjw.cc/config/bia/ansible/roles/cgit/tasks')
-rw-r--r-- | clarkzjw.cc/config/bia/ansible/roles/cgit/tasks/main.yaml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/clarkzjw.cc/config/bia/ansible/roles/cgit/tasks/main.yaml b/clarkzjw.cc/config/bia/ansible/roles/cgit/tasks/main.yaml new file mode 100644 index 0000000..872a43a --- /dev/null +++ b/clarkzjw.cc/config/bia/ansible/roles/cgit/tasks/main.yaml | |||
@@ -0,0 +1,41 @@ | |||
1 | - name: Install cgit, Nginx | ||
2 | pkgng: | ||
3 | state: present | ||
4 | name: | ||
5 | - cgit | ||
6 | - nginx | ||
7 | - fcgiwrap | ||
8 | - security/py-certbot-nginx | ||
9 | |||
10 | - name: Create git directory | ||
11 | file: | ||
12 | path: /opt/git | ||
13 | state: directory | ||
14 | owner: www | ||
15 | group: www | ||
16 | recurse: yes | ||
17 | |||
18 | - name: Create Nginx conf directory | ||
19 | file: | ||
20 | path: /usr/local/etc/nginx/conf.d | ||
21 | state: directory | ||
22 | recurse: yes | ||
23 | |||
24 | - name: Render nginx config file | ||
25 | template: | ||
26 | src: nginx.conf.j2 | ||
27 | dest: "/usr/local/etc/nginx/nginx.conf" | ||
28 | mode: 0644 | ||
29 | |||
30 | - name: Render nginx config file | ||
31 | template: | ||
32 | src: cgit.conf.j2 | ||
33 | dest: "/usr/local/etc/nginx/conf.d/cgit.conf" | ||
34 | mode: 0644 | ||
35 | |||
36 | # TODO | ||
37 | # create certbot https certificate | ||
38 | # test nginx conf | ||
39 | # reload nginx conf | ||
40 | # create git user | ||
41 | # git user permission | ||