Delete current site when playing with acme.sh
parent
6719b415ab
commit
ae6dc88bc4
|
@ -24,6 +24,13 @@
|
||||||
with_items: "{{ acme_create }}"
|
with_items: "{{ acme_create }}"
|
||||||
register: fake_site
|
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
|
- name: SERVICE | Restart nginx
|
||||||
service:
|
service:
|
||||||
name: nginx
|
name: nginx
|
||||||
|
|
Loading…
Reference in New Issue