make cronjob optional

This commit is contained in:
Robert Kaussow 2018-06-23 20:43:04 +02:00
parent 5e73dfb67c
commit cea833294f
2 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,9 @@ certbot_command_arguments:
- "-n" - "-n"
- "-d {{ certbot_domains | join(',') }}" - "-d {{ certbot_domains | join(',') }}"
# enable scheduling via cron
certbot_scheduler_enabled: True
# Use a file under /etc/cron.d # Use a file under /etc/cron.d
# Works onyl if certbot_user is root # Works onyl if certbot_user is root
# certbot_cronfile: certbot-letsencrypt # certbot_cronfile: certbot-letsencrypt

View File

@ -40,5 +40,6 @@
--logs-dir {{ certbot_log_dir }} --logs-dir {{ certbot_log_dir }}
{{ certbot_command_arguments | join(' ') }}" {{ certbot_command_arguments | join(' ') }}"
cron_file: "{{ certbot_cronfile | default(omit) }}" cron_file: "{{ certbot_cronfile | default(omit) }}"
when: certbot_scheduler_enabled
become: True become: True
become_user: "{{ certbot_user }}" become_user: "{{ certbot_user }}"