aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-09-22 14:31:23 +0800
committerAaron LI <aly@aaronly.me>2019-09-22 14:31:23 +0800
commit6407b6ec147951aaaded89a553dc9a81f49100ec (patch)
tree2a55e8d1e9903c73fa12e04dda136e2b12845bcd
parentec478a27b542c116f240edc75450b2eae4a268c6 (diff)
downloadansible-dfly-vps-6407b6ec147951aaaded89a553dc9a81f49100ec.tar.bz2
mail: Update certificate deployment w.r.t. acme.sh
-rw-r--r--roles/mail/files/acme/dovecot6
-rw-r--r--roles/mail/files/acme/postfix6
-rw-r--r--roles/mail/tasks/main.yml13
3 files changed, 7 insertions, 18 deletions
diff --git a/roles/mail/files/acme/dovecot b/roles/mail/files/acme/dovecot
deleted file mode 100644
index 367ec0b..0000000
--- a/roles/mail/files/acme/dovecot
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# ACME deployment script
-#
-
-reload dovecot
diff --git a/roles/mail/files/acme/postfix b/roles/mail/files/acme/postfix
deleted file mode 100644
index c3cc92d..0000000
--- a/roles/mail/files/acme/postfix
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# ACME deployment script
-#
-
-reload postfix
diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml
index 3379151..a9f6daa 100644
--- a/roles/mail/tasks/main.yml
+++ b/roles/mail/tasks/main.yml
@@ -183,10 +183,11 @@
- name: postfix - start service
command: rcstart postfix
-- name: acme - copy deployment scripts
- copy:
- src: "{{ item }}"
- dest: /usr/local/etc/acme/deploy.d/{{ item | basename }}
- with_fileglob:
- - "acme/*"
+- name: acme - add mail services to deploy
+ blockinfile:
+ path: "{{ web.acme_home }}/deploy.local.sh"
+ marker: "# {mark} ANSIBLE MANAGED - mail"
+ block: |
+ service dovecot reload
+ service postfix reload
tags: acme