library/roles/letsencrypt-acme-sh-client/tasks/main.yml: Always try to execute a certificate issue when the env file changes, otherwise domains additions cannot be handled.

This commit is contained in:
Andrea Dell'Amico 2018-08-20 23:18:17 +02:00
parent 794b2f3c06
commit 29a751eb22
1 changed files with 3 additions and 2 deletions

View File

@ -55,11 +55,12 @@
- name: Request the certificates
shell: /usr/local/bin/acme-sh-request-cert
args:
creates: '{{ letsencrypt_acme_sh_base_data_dir }}/data/ok_certificate_issued'
#args:
# creates: '{{ letsencrypt_acme_sh_base_data_dir }}/data/ok_certificate_issued'
register: acme_sh_certificate_issued
when: acme_sh_issue is changed
notify: Install the requested certificates
ignore_errors: True
- name: Install a daily cron job to renew the certificates when needed
cron: name="Letsencrypt certificate renewal" day={{ letsencrypt_acme_cron_day_of_month }} hour={{ letsencrypt_acme_cron_hour }} minute={{ letsencrypt_acme_cron_minute }} job="/usr/local/bin/acme-sh-cron-script > {{ letsencrypt_acme_sh_log_dir }}/acme-cron.log 2>&1"