From edcebb6ed273791005cf147d54af3e71f0b4cfb5 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Wed, 14 Oct 2020 21:40:36 -0400 Subject: Don't force by default. Check to see if the cert exists, not just the directory. --- defaults/main.yml | 2 +- tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 035f0f3..89da187 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -22,7 +22,7 @@ acmesh_flags: --staging # Set to 1 to force a renewal, you might want to set it back to 0 when done. # automatically adds a --force flag -acmesh_force: '1' +acmesh_force: '0' acmesh_user: name: acme diff --git a/tasks/main.yml b/tasks/main.yml index b788abb..abcb785 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -74,7 +74,7 @@ fi {% for item in acmesh_domains %} - if ! [ -d "certs/{{item}}" ] || ! [ -z "$force" ] ; then + if ! [ -f "certs/{{item}}/{{item}}.cer" ] || ! [ -z "$force" ] ; then acme.sh {{acmesh_flags | replace('\n', ' ')}} \ $force \ --issue \ -- cgit v1.2.3