datacoop.ansible/roles/docker/tasks/pre_deploy/mailu.yml

46 lines
1.1 KiB
YAML
Raw Normal View History

# vim: ft=yaml.ansible
2019-03-02 22:05:00 +00:00
---
- name: Create subfolders
2019-03-02 22:05:00 +00:00
file:
name: "{{ services.mailu.volume_folder }}/{{ volume }}"
2019-03-02 22:05:00 +00:00
state: directory
loop:
- redis
- certs
- data
- dkim
- mail
2022-12-27 17:32:27 +00:00
- mailqueue
2019-03-02 22:05:00 +00:00
- filter
2022-12-26 19:37:49 +00:00
- postgres
2019-03-02 22:05:00 +00:00
- webmail
2022-12-26 19:37:49 +00:00
- overrides
- overrides/nginx
- overrides/dovecot
- overrides/postfix
- overrides/rspamd
- overrides/rainloop
2019-03-02 22:05:00 +00:00
loop_control:
loop_var: volume
- name: Upload mailu.env file
2019-03-02 22:05:00 +00:00
template:
2023-08-05 17:35:55 +00:00
src: mailu/env.j2
2023-03-29 16:27:24 +00:00
dest: "{{ services.mailu.volume_folder }}/mailu.env"
2019-03-02 22:05:00 +00:00
- name: Hard link to Let's Encrypt TLS certificate
2019-03-05 14:10:15 +00:00
file:
src: "{{ services.nginx_proxy.volume_folder }}/certs/{{ services.mailu.domain }}/fullchain.pem"
dest: "{{ services.mailu.volume_folder }}/certs/cert.pem"
2019-03-05 14:10:15 +00:00
state: hard
force: true
when: letsencrypt_enabled
2019-03-05 14:10:15 +00:00
- name: Hard link to Let's Encrypt TLS key
2019-03-05 14:10:15 +00:00
file:
src: "{{ services.nginx_proxy.volume_folder }}/certs/{{ services.mailu.domain }}/key.pem"
dest: "{{ services.mailu.volume_folder }}/certs/key.pem"
2019-03-05 14:10:15 +00:00
state: hard
force: true
when: letsencrypt_enabled