summaryrefslogtreecommitdiffstats
path: root/roles/webmail/tasks/mail.yml
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2013-12-15 23:46:29 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:51:26 +0200
commit7fe517c328906d0f962c3dc33d7bc773f2348bb4 (patch)
treed8e56323c10cd32952d5b473d4ee56d605375c7d /roles/webmail/tasks/mail.yml
parent540779286a899dee846784a8ffd0fdab756ac1e3 (diff)
Configure the webmail.
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