ansible/roles/docker/tasks/services/postfix.yml

31 lines
702 B
YAML

---
- name: setup network for postfix
docker_network:
name: postfix
ipam_config:
- subnet: '172.16.0.0/16'
gateway: 172.16.0.1
- name: setup postfix docker container for outgoing mail
vars:
mynetworks:
- 127.0.0.0/8
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 172.19.199.2
- 172.19.199.3
allowed_sender_domains:
- "{{ base_domain }}"
- "lists.data.coop"
docker_container:
name: postfix
image: boky/postfix
restart_policy: unless-stopped
networks:
- name: postfix
env:
ALLOWED_SENDER_DOMAINS: "{{ allowed_sender_domains|join(' ') }}"
MYNETWORKS: "{{ mynetworks|join(',') }}"