forked from data.coop/ansible
116 lines
3 KiB
YAML
116 lines
3 KiB
YAML
---
|
|
|
|
- name: create mailu volume folders
|
|
file:
|
|
name: "{{ mailu.volume_folder }}/{{ volume }}"
|
|
state: directory
|
|
loop:
|
|
- redis
|
|
- certs
|
|
- overrides
|
|
- data
|
|
- dkim
|
|
- mail
|
|
- filter
|
|
- dav
|
|
- webmail
|
|
loop_control:
|
|
loop_var: volume
|
|
|
|
- name: mailu redis container
|
|
docker_container:
|
|
name: mailu_redis
|
|
image: redis:alpine
|
|
restart_policy: always
|
|
volumes:
|
|
- "{{ mailu.volume_folder }}/redis:/data"
|
|
|
|
- name: mailu database container
|
|
docker_container:
|
|
image: mailu/postgresql:1.6
|
|
restart_policy: always
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
volumes:
|
|
- "{{ mailu.volume_folder }}/data/psql_db:/data"
|
|
- "{{ mailu.volume_folder }}/data/psql_backup:/backup"
|
|
|
|
- name: upload mailu.env file
|
|
template:
|
|
src: mailu.env.j2
|
|
dest: "{{ mailu.volume_folder}}/mailu.env"
|
|
|
|
- name: mailu front container
|
|
docker_container:
|
|
name: mailu_front
|
|
image: mailu/nginx:1.6
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
volumes:
|
|
- "{{ mailu.volume_folder }}/certs:/certs"
|
|
- "{{ mailu.volume_folder }}/overrides/nginx:/overrides"
|
|
|
|
- name: mailu admin container
|
|
docker_container:
|
|
image: mailu/admin:1.6
|
|
restart_policy: always
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
volumes:
|
|
- "{{ mailu.volume_folder}}/data:/data"
|
|
- "{{ mailu.volume_folder}}/dkim:/dkim"
|
|
|
|
- name: mailu imap container
|
|
docker_container:
|
|
image: mailu/dovecot:1.6
|
|
restart_policy: always
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
volumes:
|
|
- "{{ mailu.volume_folder}}/mail:/mail"
|
|
- "{{ mailu.volume_folder}}/overrides:/overrides"
|
|
|
|
- name: mailu smtp container
|
|
docker_container:
|
|
image: mailu/postfix:1.6
|
|
restart_policy: always
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
volumes:
|
|
- "{{ mailu.volume_folder}}/overrides:/overrides"
|
|
|
|
- name: mailu antispam container
|
|
docker_container:
|
|
image: mailu/rspamd:1.6
|
|
restart_policy: always
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
volumes:
|
|
- "{{ mailu.volume_folder}}/filter:/var/lib/rspamd"
|
|
- "{{ mailu.volume_folder}}/dkim:/dkim"
|
|
- "{{ mailu.volume_folder}}/overrides/rspamd:/etc/rspamd/override.d"
|
|
|
|
- name: mailu antivirus container
|
|
docker_container:
|
|
image: mailu/clamav:1.6
|
|
restart_policy: always
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
volumes:
|
|
- "{{ mailu.volume_folder}}/filter:/data"
|
|
|
|
- name: mailu webdav container
|
|
docker_container:
|
|
image: mailu/radicale:1.6
|
|
restart_policy: always
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
volumes:
|
|
- "{{ mailu.volume_folder}}/dav:/data"
|
|
|
|
- name: mailu fetchmail container
|
|
docker_container:
|
|
image: mailu/fetchmail:1.6
|
|
restart_policy: always
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
|
|
- name: mailu webmail container
|
|
docker_container:
|
|
image: mailu/rainloop:1.6
|
|
restart_policy: always
|
|
env_file: "{{ mailu.volume_folder}}/mailu.env"
|
|
volumes:
|
|
- "{{ mailu.volume_folder }}/webmail:/data"
|