2022-05-31 04:36:55 +00:00
|
|
|
---
|
2022-05-30 15:46:36 +00:00
|
|
|
- name: Install system nginx config
|
2022-08-02 18:38:55 +00:00
|
|
|
copy:
|
2023-01-14 23:26:17 +00:00
|
|
|
src: nginx.conf
|
2022-05-30 15:46:36 +00:00
|
|
|
dest: /etc/nginx/nginx.conf
|
2023-01-16 03:54:03 +00:00
|
|
|
notify: setup nginx
|
2022-05-30 15:46:36 +00:00
|
|
|
|
2022-05-31 18:48:01 +00:00
|
|
|
# setup our configs for each host (we don't want to
|
|
|
|
# overwrite certbot's changes, so if it already exists,
|
|
|
|
# don't copy!)
|
|
|
|
|
2022-05-30 15:46:36 +00:00
|
|
|
- name: Install nginx config for {{ domain }}
|
|
|
|
template:
|
2023-01-14 23:26:17 +00:00
|
|
|
src: templates/site.conf
|
2022-05-30 15:46:36 +00:00
|
|
|
dest: /etc/nginx/conf.d/{{ domain }}.conf
|
2022-05-31 18:48:01 +00:00
|
|
|
force: no
|
2023-01-16 03:54:03 +00:00
|
|
|
notify: setup nginx
|
2022-05-30 15:46:36 +00:00
|
|
|
|
|
|
|
- name: Install nginx config for git.{{ domain }}
|
|
|
|
template:
|
2023-01-14 23:26:17 +00:00
|
|
|
src: templates/gitea.conf
|
2022-05-30 15:46:36 +00:00
|
|
|
dest: /etc/nginx/conf.d/git.{{ domain }}.conf
|
2022-05-31 18:48:01 +00:00
|
|
|
force: no
|
2023-01-16 03:54:03 +00:00
|
|
|
notify: setup nginx
|
2022-05-30 15:46:36 +00:00
|
|
|
|
|
|
|
- name: Install nginx config for our Hidden Service
|
|
|
|
template:
|
2023-01-14 23:26:17 +00:00
|
|
|
src: templates/tor.conf
|
2022-05-30 15:46:36 +00:00
|
|
|
dest: /etc/nginx/conf.d/tor-{{ domain }}.conf
|
|
|
|
|
2023-01-16 03:54:03 +00:00
|
|
|
- name: Enable Nginx
|
2022-05-30 15:46:36 +00:00
|
|
|
systemd:
|
|
|
|
name: nginx
|
|
|
|
enabled: yes
|
2023-01-16 03:54:03 +00:00
|
|
|
state: started
|