diff --git a/roles/certbot/tasks/main.yml b/roles/certbot/tasks/main.yml index 91e2fde88b64b661c3255bda72f48fa51583b93e..90fe154f91b994233db2d6ebfcbe5a5d4fb54929 100644 --- a/roles/certbot/tasks/main.yml +++ b/roles/certbot/tasks/main.yml @@ -45,6 +45,8 @@ - name: Run certbot command: certbot --non-interactive --config /etc/letsencrypt/conf.d/{{ item.certname }}.ini certonly + register: certbot_output + changed_when: not "Certificate not yet due for renewal" in certbot_output.stdout loop: "{{ certbot }}" - name: Clean old files