2022-12-29 21:13:31 +00:00
|
|
|
# vim: ft=yaml.ansible
|
2024-03-01 20:30:18 +00:00
|
|
|
# code: language=ansible
|
2019-03-02 22:05:00 +00:00
|
|
|
---
|
2023-10-03 19:19:51 +00:00
|
|
|
- name: Create subfolders
|
2019-03-02 22:05:00 +00:00
|
|
|
file:
|
2022-11-26 08:15:18 +00:00
|
|
|
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
|
2023-12-10 21:04:09 +00:00
|
|
|
- overrides/snappymail
|
2019-03-02 22:05:00 +00:00
|
|
|
loop_control:
|
|
|
|
loop_var: volume
|
|
|
|
|
2023-10-03 19:19:51 +00:00
|
|
|
- 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
|
|
|
|
2023-10-03 19:19:51 +00:00
|
|
|
- name: Hard link to Let's Encrypt TLS certificate
|
2019-03-05 14:10:15 +00:00
|
|
|
file:
|
2022-11-26 08:15:18 +00:00
|
|
|
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
|
2023-09-30 14:25:06 +00:00
|
|
|
force: true
|
2022-11-25 13:07:09 +00:00
|
|
|
when: letsencrypt_enabled
|
2019-03-05 14:10:15 +00:00
|
|
|
|
2023-10-03 19:19:51 +00:00
|
|
|
- name: Hard link to Let's Encrypt TLS key
|
2019-03-05 14:10:15 +00:00
|
|
|
file:
|
2022-11-26 08:15:18 +00:00
|
|
|
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
|
2023-09-30 14:25:06 +00:00
|
|
|
force: true
|
2022-11-25 13:07:09 +00:00
|
|
|
when: letsencrypt_enabled
|