computer-playbook/roles/server_docker-mailu/tasks/main.yml

54 lines
1.7 KiB
YAML
Raw Normal View History

2020-12-27 13:22:47 +01:00
---
2020-12-27 19:41:35 +01:00
- name: recieve {{domain}} certificate
command: certbot certonly --agree-tos --email {{administrator_email}} --non-interactive --webroot -w /var/lib/letsencrypt/ -d {{domain}}
2020-12-27 16:16:12 +01:00
- name: configure {{domain}}.conf
2021-01-05 13:25:59 +01:00
vars:
client_max_body_size: "31M"
2023-04-18 15:41:14 +02:00
template: src=roles/server_native-docker-reverse-proxy/templates/domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
2020-12-27 16:16:12 +01:00
notify: restart nginx
2023-04-19 00:03:13 +02:00
- name: "create /home/administrator/docker-compose/mailu"
2020-12-27 13:22:47 +01:00
file:
2023-04-19 00:03:13 +02:00
path: "/home/administrator/docker-compose/mailu"
2020-12-28 21:24:32 +01:00
state: directory
mode: 0755
2021-04-05 16:22:55 +02:00
2021-10-18 18:46:58 +02:00
- name: "create /home/administrator/scripts/mailu"
2021-04-05 12:32:55 +02:00
file:
2021-10-18 18:46:58 +02:00
path: "/home/administrator/scripts/mailu"
state: directory
mode: 0755
- name: "create /etc/mailu/"
file:
path: "/etc/mailu"
2021-04-05 12:32:55 +02:00
state: directory
mode: 0755
2020-12-28 21:24:32 +01:00
2021-10-18 18:46:58 +02:00
- name: "create /etc/mailu/certs"
2020-12-28 21:24:32 +01:00
file:
2021-10-18 18:46:58 +02:00
path: "/etc/mailu/certs"
2020-12-27 13:22:47 +01:00
state: directory
mode: 0755
2023-04-19 00:03:13 +02:00
- name: add docker-compose.yml
template: src=docker-compose.yml.j2 dest=/home/administrator/docker-compose/mailu/docker-compose.yml
2021-04-05 09:34:09 +02:00
notify: recreate mailu
2020-12-27 13:22:47 +01:00
2020-12-27 19:41:35 +01:00
- name: add mailu.env
2023-04-19 00:03:13 +02:00
template: src=mailu.env.j2 dest=/home/administrator/docker-compose/mailu/mailu.env
2021-04-05 09:34:09 +02:00
notify: recreate mailu
2021-04-05 12:32:55 +02:00
- name: add deploy-letsencrypt-mailu.sh
2021-10-18 18:46:58 +02:00
template: src=deploy-letsencrypt-mailu.sh.j2 dest=/home/administrator/scripts/mailu/deploy-letsencrypt-mailu.sh
2021-04-05 12:32:55 +02:00
- name: configure deploy-letsencrypt-mailu.service
template: src=deploy-letsencrypt-mailu.service.j2 dest=/etc/systemd/system/deploy-letsencrypt-mailu.service
notify: restart deploy-letsencrypt-mailu.service
2021-04-05 16:22:55 +02:00
- name: configure deploy-letsencrypt-mailu.timer
template: src=deploy-letsencrypt-mailu.timer.j2 dest=/etc/systemd/system/deploy-letsencrypt-mailu.timer
notify: restart deploy-letsencrypt-mailu.timer