ansible-role-mailserver/tasks/postfix.yml

41 lines
853 B
YAML
Raw Normal View History

2020-07-24 12:42:59 +02:00
- name: postfix - install
2020-07-20 09:46:16 +02:00
package:
state: latest
name:
- postfix
2020-07-24 12:42:59 +02:00
- name: postfix - generate DH
notify: reload postfix
openssl_dhparam:
path: /etc/postfix/dh.pem
size: 4096
- name: postfix - create sql folder
notify: reload postfix
file:
path: /etc/postfix/sql
state: directory
- name: postfix - config
notify: reload postfix
template:
src: "postfix/{{ item }}"
dest: "/etc/postfix/{{ item }}"
with_items:
- main.cf
- master.cf
- sql/smtpd-sender-login-maps.cf
- sql/tls-policy.cf
- sql/virtual-sender-maps.cf
- sql/virtual-alias-domains.cf
- sql/virtual-alias-domains-maps.cf
- sql/virtual-alias-maps.cf
- sql/virtual-mailbox-domains.cf
- sql/virtual-mailbox-maps.cf
- name: postfix - start and enable on boot
systemd:
name: postfix
enabled: yes
state: started