From cea833294f1155d0b88988ab13d53cf9bac81f3e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 23 Jun 2018 20:43:04 +0200 Subject: [PATCH] make cronjob optional --- defaults/main.yml | 3 +++ tasks/install.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 5971709..c76d169 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -27,6 +27,9 @@ certbot_command_arguments: - "-n" - "-d {{ certbot_domains | join(',') }}" +# enable scheduling via cron +certbot_scheduler_enabled: True + # Use a file under /etc/cron.d # Works onyl if certbot_user is root # certbot_cronfile: certbot-letsencrypt diff --git a/tasks/install.yml b/tasks/install.yml index 3ba4280..e2443b5 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -40,5 +40,6 @@ --logs-dir {{ certbot_log_dir }} {{ certbot_command_arguments | join(' ') }}" cron_file: "{{ certbot_cronfile | default(omit) }}" + when: certbot_scheduler_enabled become: True become_user: "{{ certbot_user }}"