forked from ISTI-ansible-roles/ansible-roles
Run the acme.sh cron job as root.
This commit is contained in:
parent
0d37228a63
commit
b1c9dd9ead
|
@ -34,6 +34,10 @@
|
|||
- acme-sh-cron-command
|
||||
tags: [ 'letsencrypt', 'letsencrypt_cron', 'letsencrypt_acme_sh' ]
|
||||
|
||||
- name: Install a daily cron job to renew the certificates when needed. It runs as root
|
||||
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"
|
||||
tags: [ 'letsencrypt', 'letsencrypt_cron', 'letsencrypt_acme_sh' ]
|
||||
|
||||
when: letsencrypt_acme_sh_install
|
||||
tags: [ 'letsencrypt', 'letsencrypt_acme_sh' ]
|
||||
|
||||
|
@ -62,8 +66,8 @@
|
|||
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"
|
||||
- name: Remove the daily cron job that run as acme user.
|
||||
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" state=absent
|
||||
tags: [ 'letsencrypt', 'letsencrypt_cron', 'letsencrypt_acme_sh' ]
|
||||
|
||||
become: True
|
||||
|
|
Loading…
Reference in New Issue