From ae6dc88bc4147276b50b3161f9063663fff24fd4 Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Thu, 22 Mar 2018 17:49:02 +0100 Subject: [PATCH] Delete current site when playing with acme.sh --- tasks/ssl/acme.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/ssl/acme.yml b/tasks/ssl/acme.yml index 804185d..2667796 100644 --- a/tasks/ssl/acme.yml +++ b/tasks/ssl/acme.yml @@ -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