diff --git a/tasks/apache.yml b/tasks/apache.yml index 67b9b68..6eb1446 100644 --- a/tasks/apache.yml +++ b/tasks/apache.yml @@ -79,13 +79,13 @@ - name: Reload apache if necessary meta: flush_handlers -- name: Automatically renew LE certs with cron +- name: Reload Apache to install the renewed certificates. cron: name: "Renew letsencrypt SSL certificates" minute: "{{ letsencrypt_renew_cron_minute }}" day: "{{ letsencrypt_renew_cron_day }}" hour: "{{ letsencrypt_renew_cron_hour }}" - job: "/snap/bin/certbot renew --quiet --webroot-path {{ letsencrypt_webroot }} && /usr/sbin/apachectl configtest 2>&1 | /bin/grep -v 'Syntax OK' || {{ service_binary }} {{ apache2_name }} reload" + job: "/usr/sbin/apachectl configtest 2>&1 | /bin/grep -v 'Syntax OK' || {{ service_binary }} {{ apache2_name }} reload" when: ansible_os_family == 'Debian' tags: - letsencrypt_cron diff --git a/tasks/nginx.yml b/tasks/nginx.yml index 11a70c7..da5b003 100644 --- a/tasks/nginx.yml +++ b/tasks/nginx.yml @@ -43,12 +43,12 @@ - name: Reload nginx if necessary meta: flush_handlers -- name: Automatically renew LE certs with cron +- name: Reload nginx to install the renewed certificates cron: name: "Renew letsencrypt SSL certificates" minute: "{{ letsencrypt_renew_cron_minute }}" day: "{{ letsencrypt_renew_cron_day }}" hour: "{{ letsencrypt_renew_cron_hour }}" - job: "/snap/bin/certbot renew --quiet --webroot-path {{ letsencrypt_webroot }} && /usr/sbin/nginx -tq && {{ service_binary }} nginx reload > /dev/null" + job: "/usr/sbin/nginx -tq && {{ service_binary }} nginx reload > /dev/null" tags: - letsencrypt_cron