From 35fba2ec5aa5a4f61ed4e8d805fab294549daa13 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 6 Mar 2018 15:59:39 +0800 Subject: mail/dovecot: generate passwd from template --- roles/mail/tasks/main.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'roles/mail/tasks') diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index c0f3d4f..9718db9 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -92,17 +92,21 @@ -exec sievec '{}' ';' tags: dovecot -- name: dovecot - copy passwd - copy: - src: "{{ playbook_dir }}/private/dovecot/passwd" +- name: dovecot - include passdb vars file + include_vars: "{{ playbook_dir }}/private/dovecot/passdb.yml" + tags: dovecot + +- name: dovecot - generate passwd + template: + src: dovecot/passwd.j2 dest: /usr/local/etc/dovecot/passwd group: dovecot mode: 0440 tags: dovecot -- name: opendkim - generate config file +- name: dovecot - generate config file template: - src: dovecot.conf.j2 + src: dovecot/dovecot.conf.j2 dest: /usr/local/etc/dovecot/dovecot.conf notify: reload-dovecot tags: dovecot -- cgit v1.2.2