27 lines
699 B
YAML
27 lines
699 B
YAML
# vim: ft=yaml.ansible
|
|
---
|
|
- name: Create Docker network for Postfix
|
|
docker_network:
|
|
name: postfix
|
|
|
|
- name: Create Postfix volume directories
|
|
file:
|
|
name: "{{ services.postfix.volume }}/dkim"
|
|
owner: root
|
|
mode: u=rwx,g=rx,o=rx
|
|
state: directory
|
|
|
|
- name: Deploy Postfix Docker container
|
|
docker_container:
|
|
name: postfix
|
|
image: boky/postfix:{{ services.postfix.version }}
|
|
restart_policy: always
|
|
env:
|
|
ALLOWED_SENDER_DOMAINS: "{{ sender_domains | join(' ') }}"
|
|
HOSTNAME: "{{ services.postfix.hostname }}"
|
|
DKIM_AUTOGENERATE: "true"
|
|
networks:
|
|
- name: postfix
|
|
volumes:
|
|
- "{{ services.postfix.volume }}/dkim:/etc/opendkim/keys:rw"
|