30 lines
716 B
YAML
30 lines
716 B
YAML
- name: install postfix
|
|
apt:
|
|
pkg:
|
|
- postfix
|
|
- postfix-ldap
|
|
|
|
- name: remove exim4 package
|
|
apt:
|
|
name: exim4
|
|
state: absent
|
|
|
|
- name: copy postfix config
|
|
template:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
with_items:
|
|
- { src: "main.cf.j2", dest: "/etc/postfix/main.cf" }
|
|
- { src: "master.cf.j2", dest: "/etc/postfix/master.cf" }
|
|
- { src: "virtual-senders.cf.j2", dest: "/etc/postfix/virtual-senders.cf" }
|
|
- { src: "virtual-recipients.cf.j2", dest: "/etc/postfix/virtual-recipients.cf" }
|
|
notify:
|
|
- restart postfix
|
|
|
|
- name: copy postfix maps
|
|
template:
|
|
src: maps.j2
|
|
dest: "{{ item }}"
|
|
with_items: "{{ postfixmaps }}"
|
|
notify:
|
|
- restart postfix
|