From 7ab4b7f928951e42cb37c7565ca72d7444ba0bd8 Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Sun, 24 Nov 2019 00:28:56 +0000 Subject: [PATCH] Adding post-renewal hook for LE --- .../files/etc/letsencrypt/renewal-hooks/update-postfix | 4 ++++ roles/common/tasks/main.yml | 1 + roles/common/tasks/postfix.yml | 9 +++++++++ 3 files changed, 14 insertions(+) create mode 100644 roles/common/files/etc/letsencrypt/renewal-hooks/update-postfix create mode 100644 roles/common/tasks/postfix.yml diff --git a/roles/common/files/etc/letsencrypt/renewal-hooks/update-postfix b/roles/common/files/etc/letsencrypt/renewal-hooks/update-postfix new file mode 100644 index 00000000..87b4a1a3 --- /dev/null +++ b/roles/common/files/etc/letsencrypt/renewal-hooks/update-postfix @@ -0,0 +1,4 @@ +#!/bin/bash + +/bin/systemctl restart postfix +/bin/systemctl restart dovecot diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 61e244ac..d91d4386 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -10,3 +10,4 @@ - include: manpage.yml - include: monitoring.yml - include: scripts.yml +- include: postfix.yml diff --git a/roles/common/tasks/postfix.yml b/roles/common/tasks/postfix.yml new file mode 100644 index 00000000..b997138c --- /dev/null +++ b/roles/common/tasks/postfix.yml @@ -0,0 +1,9 @@ +# This setup the letsencrypt stuff we have +--- +- name: Set up post-deploy LE stuff + copy: + src: ../files/etc/letsencrypt/renewal-hooks/postfix + dest: /etc/letsencrypt/renewal-hooks/postfix + owner: root + group: root + mode: 0644