Delete current site when playing with acme.sh

pull/35/head
Emilien Mantel 2018-03-22 17:49:02 +01:00
parent 6719b415ab
commit ae6dc88bc4
1 changed files with 7 additions and 0 deletions

View File

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