letsencrypt: sleep for at most 1200 seconds before running the certificate renewal script.

This commit is contained in:
Andrea Dell'Amico 2017-11-21 16:43:01 +01:00
parent 4ecc39e18f
commit 94eba820ae
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@
- name: Install a daily cron job to renew the certificates when needed
become: True
become_user: '{{ letsencrypt_acme_user }}'
cron: name="Letsencrypt certificate renewal" special_time=daily job="/usr/local/bin/acme-cert-request > {{ letsencrypt_acme_log_dir }}/acme-cron.log 2>&1"
cron: name="Letsencrypt certificate renewal" special_time=daily job="SLEEP_SECONDS=$(echo $[($RANDOM %1200)]) ; sleep ${SLEEP_SECONDS} ; /usr/local/bin/acme-cert-request > {{ letsencrypt_acme_log_dir }}/acme-cron.log 2>&1"
when: letsencrypt_acme_install
tags: letsencrypt