From f1b63dc3d5373377dcd2a24fd394344cbcce87f5 Mon Sep 17 00:00:00 2001 From: Chithra K <63741367+Chithrak07@users.noreply.github.com> Date: Thu, 21 Oct 2021 00:54:23 +0530 Subject: [PATCH] Remove redundant cron actions Closes #12 --- tasks/apache.yml | 4 ++-- tasks/nginx.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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