diff --git a/roles/dehydrated/defaults/main.yml b/roles/dehydrated/defaults/main.yml index 74a8e83..d3e3fb7 100644 --- a/roles/dehydrated/defaults/main.yml +++ b/roles/dehydrated/defaults/main.yml @@ -6,3 +6,6 @@ dehydrated_binary: "/usr/local/bin/dehydrated" dehydrated_config_dir: "/usr/local/etc/dehydrated" dehydrated_certs_dir: "{{ dehydrated_config_dir }}/certs" dehydrated_wellknown_dir: "{{ dehydrated_config_dir }}/challenge" + +dehydrated_cron_minute: 0 +dehydrated_cron_hour: 3 diff --git a/roles/dehydrated/tasks/main.yml b/roles/dehydrated/tasks/main.yml index 8614ded..77456f8 100644 --- a/roles/dehydrated/tasks/main.yml +++ b/roles/dehydrated/tasks/main.yml @@ -50,4 +50,10 @@ src: config.j2 dest: "{{ dehydrated_config_dir }}/config" notify: dehydrated register - \ No newline at end of file + +- name: Install dehydrated cron job. + cron: + name: renew dehydrated certs + hour: dehydrated_cron_hour + minute: dehydrated_cron_minute + job: "{{ dehydrated_binary }} -c -g" \ No newline at end of file