summaryrefslogtreecommitdiffstats
path: root/roles/webmail/tasks/mail.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/webmail/tasks/mail.yml')
-rw-r--r--roles/webmail/tasks/mail.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/roles/webmail/tasks/mail.yml b/roles/webmail/tasks/mail.yml
new file mode 100644
index 0000000..d3fb64e
--- /dev/null
+++ b/roles/webmail/tasks/mail.yml
@@ -0,0 +1,20 @@
+- name: Install Postfix
+ apt: pkg={{ item }}
+ with_items:
+ - postfix
+ - postfix-pcre
+
+- name: Configure Postfix
+ template: src=etc/postfix/main.cf.j2
+ dest=/etc/postfix-{{ postfix_instance[inst].name }}/main.cf
+ owner=root group=root
+ mode=0644
+ register: r
+ notify:
+ - Restart Postfix
+
+- name: Start Postfix
+ service: name=postfix state=started
+ when: not r.changed
+
+- meta: flush_handlers