1
0
forked from infra/ansible
infra/roles/mail/tasks/main.yml

40 lines
779 B
YAML
Raw Normal View History

---
- name: Install packages
apt: name={{ item }} state=present
with_items:
- postfix
2016-02-01 20:52:34 +01:00
- amavisd-new
- postgrey
- spamassassin
- dovecot-core
2016-02-01 20:52:34 +01:00
- dovecot-imapd
- dovecot-sieve
- dovecot-managesieved
- dovecot-ldap
2016-02-01 20:52:34 +01:00
tags: mail
- name: Configure postfix
2016-02-01 20:52:34 +01:00
template: src={{ item }} dest=/etc/postfix/{{ item }}
with_items:
- ldap-aliases.cf.j2
- ldap-virtual-maps.cf.j2
2016-02-15 19:17:28 +01:00
notify: Restart postfix
2016-02-01 20:52:34 +01:00
tags: mail
2016-02-01 20:52:34 +01:00
- name: Start amavis
service: name=amavis state=started enabled=yes
tags: mail
- name: Start dovecot
service: name=dovecot state=started enabled=yes
2016-02-01 20:52:34 +01:00
tags: mail
- name: Start postfix
service: name=postfix state=started enabled=yes
2016-02-01 20:52:34 +01:00
tags: mail
- name: Start postgrey
service: name=postgrey state=started enabled=yes
tags: mail