mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-03-10 10:12:09 +07:00
Delete current site when playing with acme.sh
This commit is contained in:
@@ -24,6 +24,13 @@
|
||||
with_items: "{{ acme_create }}"
|
||||
register: fake_site
|
||||
|
||||
- name: FILE | Delete current site if needed
|
||||
file:
|
||||
path: "{{ nginx_etc_dir }}/sites-enabled/{{ item | nginx_site_name }}"
|
||||
state: absent
|
||||
with_items: "{{ acme_create }}"
|
||||
when: fake_site.changed
|
||||
|
||||
- name: SERVICE | Restart nginx
|
||||
service:
|
||||
name: nginx
|
||||
|
||||
Reference in New Issue
Block a user