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

25 lines
592 B
YAML

# vim: ft=yaml.ansible
---
- name: Set up network for Postfix
docker_network:
name: postfix
ipam_config:
- subnet: '172.16.0.0/16'
gateway: 172.16.0.1
- name: Create volume folders for Postfix
file:
name: "{{ services.postfix.volume_folder }}/dkim"
state: directory
- name: Upload Compose file for Postfix
template:
src: compose-files/postfix.yml.j2
dest: "{{ services.forgejo.volume_folder }}/docker-compose.yml"
- name: Deploy Postfix
docker_compose:
project_src: "{{ services.postfix.volume_folder }}"
pull: true
state: present