35 lines
705 B
YAML
35 lines
705 B
YAML
---
|
|
- name: Install postfix
|
|
apt:
|
|
update_cache: true
|
|
name:
|
|
- postfix
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
- name: Deploy postfix configuration
|
|
template:
|
|
src: "postfix/{{ item }}.j2"
|
|
dest: "/etc/postfix/{{ item }}"
|
|
mode: 0644
|
|
owner: root
|
|
group: root
|
|
loop: []
|
|
# - main.cf
|
|
# - master.cf
|
|
# - transport
|
|
# - mime_header_checks
|
|
# - recipient_access
|
|
# - sender_login_maps
|
|
# - postscreen_access.cidr
|
|
# - sasl/smtpd.conf
|
|
# - client_checks
|
|
notify: Restart postfix
|
|
|
|
- name: Indicate role in motd
|
|
template:
|
|
src: update-motd.d/05-postfix-mailman.j2
|
|
dest: /etc/update-motd.d/05-postfix-mailman
|
|
mode: 0755
|