diff --git a/roles/certbot/tasks/main.yml b/roles/certbot/tasks/main.yml index 91e2fde8..90fe154f 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