mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2025-11-08 00:20:05 +00:00
roles/gitea: support giteaUninstall variable
This commit is contained in:
3
roles/nginx/defaults/main.yml
Normal file
3
roles/nginx/defaults/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
giteaPort: 3000
|
||||
giteaUninstall: false
|
||||
@@ -22,6 +22,14 @@
|
||||
dest: /etc/nginx/conf.d/git.{{ domain }}.conf
|
||||
force: no
|
||||
notify: setup nginx
|
||||
when: giteaPort is defined and giteaUninstall == false
|
||||
|
||||
- name: Uninstall nginx config for git.{{ domain }}
|
||||
file:
|
||||
path: /etc/nginx/conf.d/git.{{ domain }}.conf
|
||||
state: absent
|
||||
notify: setup nginx
|
||||
when: giteaPort is not defined or (giteaUninstall is defined and giteaUninstall)
|
||||
|
||||
- name: Install nginx config for our Hidden Service
|
||||
template:
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
---
|
||||
- name: Setup certbot
|
||||
shell: "certbot --nginx --non-interactive --agree-tos -m {{ contact_email }} -d {{ domain }} -d git.{{ domain }}"
|
||||
- name: Setup certbot for {{ domain }}
|
||||
shell: "certbot --nginx --non-interactive --agree-tos -m {{ contact_email }} -d {{ domain }}"
|
||||
|
||||
- name: Setup certbot for git.{{ domain }}
|
||||
shell: "certbot --nginx --non-interactive --agree-tos -m {{ contact_email }} -d git.{{ domain }}"
|
||||
when: giteaPort is defined and giteaUninstall == false
|
||||
|
||||
- name: Reload Nginx
|
||||
systemd:
|
||||
|
||||
@@ -4,7 +4,7 @@ server {
|
||||
|
||||
location / {
|
||||
add_header Permissions-Policy interest-cohort=();
|
||||
proxy_pass http://localhost:3000;
|
||||
proxy_pass http://localhost:{{ giteaPort }};
|
||||
}
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
Reference in New Issue
Block a user