From 4ff88a0af31ce378b97f79d6a4e827337adfbcf2 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Mon, 15 Feb 2021 18:18:36 +0100 Subject: [PATCH] =?UTF-8?q?cron=20job=20f=C3=BCr=20dehydrated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/dehydrated/defaults/main.yml | 3 +++ roles/dehydrated/tasks/main.yml | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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