roles/gitea: support giteaUninstall variable

This commit is contained in:
2023-01-21 18:25:02 -06:00
parent e8fe024b77
commit af53eb4637
10 changed files with 94 additions and 45 deletions

View File

@@ -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:

View File

@@ -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: