diff --git a/defaults/main.yml b/defaults/main.yml index f173e27..a8961f0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -29,6 +29,6 @@ lego_key_type: "ec256" # @end lego_certificates: [] -lego_cron_enabled: True -lego_cron_minute: "0" -lego_cron_hour: "2" +lego_renew_enabled: True +lego_renew_interval: "*-*-* 1:35" +lego_renew_randomized_delay: "1h" diff --git a/templates/etc/systemd/system/lego-renew.timer.j2 b/templates/etc/systemd/system/lego-renew.timer.j2 index fbe547b..d2398c9 100644 --- a/templates/etc/systemd/system/lego-renew.timer.j2 +++ b/templates/etc/systemd/system/lego-renew.timer.j2 @@ -2,8 +2,9 @@ Description=Lego renew [Timer] -OnCalendar={{ lego_renew_interval }} Persistent=true +OnCalendar={{ lego_renew_interval }} +RandomizedDelaySec={{ lego_renew_randomized_delay }} [Install] WantedBy=timers.target