openpunk-ansible/roles/nginx/tasks/main.yml

35 lines
823 B
YAML
Raw Normal View History

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:
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
# 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:
src: templates/site.conf
2022-05-30 15:46:36 +00:00
dest: /etc/nginx/conf.d/{{ domain }}.conf
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:
src: templates/gitea.conf
2022-05-30 15:46:36 +00:00
dest: /etc/nginx/conf.d/git.{{ domain }}.conf
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:
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