nginx/tasks/froxlor_delete_vhost.yml

62 lines
1.3 KiB
YAML

---
- name: "Remove symlink proxy"
file:
state: absent
path: "/etc/nginx/sites-enabled/froxlor_{{ loop_domain }}-443.conf"
tags:
- froxlor
when:
- use_froxlor is defined
- use_froxlor
- loop_domain not in domains
notify:
- Reload Nginx
- name: "Remove symlink redirect"
file:
state: absent
path: "/etc/nginx/sites-enabled/froxlor_{{ loop_domain }}-80.conf"
tags:
- froxlor
when:
- use_froxlor is defined
- use_froxlor
- loop_domain not in domains
notify:
- Reload Nginx
- name: "Remove website proxy conf"
file:
state: absent
path: "/etc/nginx/sites-available/froxlor_{{ loop_domain }}-443.conf"
tags:
- froxlor
when:
- use_froxlor is defined
- use_froxlor
- loop_domain not in domains
- name: "Remove website redirect conf"
file:
state: absent
path: "/etc/nginx/sites-available/froxlor_{{ loop_domain }}-80.conf"
tags:
- froxlor
when:
- use_froxlor is defined
- use_froxlor
- loop_domain not in domains
- name: "Revoke Let's Encrypt cert"
shell: "certbot revoke --delete-after-revoke --cert-path /etc/letsencrypt/live/{{ loop_domain }}/cert.pem"
ignore_errors: yes
tags:
- froxlor
when:
- use_froxlor is defined
- use_froxlor
- loop_domain not in domains
notify:
- Reload Nginx