Add a var for specify the cron task manualy.

This commit is contained in:
Lucas 2019-12-12 16:14:24 -05:00
parent 6e17af0ac5
commit 97e9191b74
No known key found for this signature in database
GPG Key ID: 98B61A513501E23D
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,8 @@ certbot_auto_renew_user: "{{ ansible_user | default(lookup('env', 'USER')) }}"
certbot_auto_renew_hour: "3"
certbot_auto_renew_minute: "30"
certbot_auto_renew_options: "--quiet --no-self-upgrade"
# Define the following var for bypass default cron job command.
# certbot_auto_renew_command: ""
# Parameters used when creating new Certbot certs.
certbot_create_if_missing: false

View File

@ -2,7 +2,8 @@
- name: Add cron job for certbot renewal (if configured).
cron:
name: Certbot automatic renewal.
job: "{{ certbot_script }} renew {{ certbot_auto_renew_options }}"
cron_file: ansible_certbot-auto-renew
job: "{{ certbot_auto_renew_command | default(certbot_script + ' renew ' + certbot_auto_renew_options) }} "
minute: "{{ certbot_auto_renew_minute }}"
hour: "{{ certbot_auto_renew_hour }}"
user: "{{ certbot_auto_renew_user }}"