From 306becedf8d21ef74e1d09f90ff4a3a038423c53 Mon Sep 17 00:00:00 2001 From: clime Date: Fri, 8 Mar 2019 11:55:11 +0100 Subject: [PATCH] libravatar: install cron.daily job for cert renewal --- roles/libravatar/files/cron.daily/libravatar | 3 +++ roles/libravatar/tasks/main.yml | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 roles/libravatar/files/cron.daily/libravatar diff --git a/roles/libravatar/files/cron.daily/libravatar b/roles/libravatar/files/cron.daily/libravatar new file mode 100644 index 0000000000..7ca1fdfa23 --- /dev/null +++ b/roles/libravatar/files/cron.daily/libravatar @@ -0,0 +1,3 @@ +#!/bin/bash + +certbot renew --post-hook 'systemctl reload httpd' diff --git a/roles/libravatar/tasks/main.yml b/roles/libravatar/tasks/main.yml index 47048d1519..70456a2c98 100644 --- a/roles/libravatar/tasks/main.yml +++ b/roles/libravatar/tasks/main.yml @@ -21,6 +21,7 @@ - postfix - mod_ssl - letsencrypt + - cronie - name: configure postfix for email encryption and not relaying to bastion command: "{{ item }}" @@ -118,7 +119,11 @@ tags: - config -- name: ensure httpd state +- name: cron.daily job + copy: src="cron.daily/libravatar" dest="/etc/cron.daily/libravatar" + +- name: ensure service states service: state=started enabled=yes name={{ item }} with_items: - httpd + - crond