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
|
|
|
|
template: src=domain.conf.j2 dest=/etc/nginx/conf.d/{{domain}}.conf
|
|
|
|
notify: restart nginx
|
|
|
|
|
2020-12-27 19:41:35 +01:00
|
|
|
- name: "create mailu dir"
|
2020-12-27 13:22:47 +01:00
|
|
|
file:
|
|
|
|
path: "/mailu"
|
|
|
|
state: directory
|
|
|
|
mode: 0755
|
|
|
|
|
2020-12-27 19:41:35 +01:00
|
|
|
- name: add docker-compose.yml
|
|
|
|
template: src=docker-compose.yml.j2 dest=/mailu/docker-compose.yml
|
2020-12-27 20:17:17 +01:00
|
|
|
notify: restart mailu
|
2020-12-27 13:22:47 +01:00
|
|
|
|
2020-12-27 19:41:35 +01:00
|
|
|
- name: add mailu.env
|
|
|
|
template: src=mailu.env.j2 dest=/mailu/mailu.env
|
2020-12-27 20:17:17 +01:00
|
|
|
notify: restart mailu
|
2020-12-27 13:22:47 +01:00
|
|
|
|
2020-12-27 19:41:35 +01:00
|
|
|
- name: "install mailu service"
|
2020-12-27 13:22:47 +01:00
|
|
|
copy:
|
|
|
|
src: "mailu.service"
|
|
|
|
dest: "/etc/systemd/system/mailu.service"
|
2020-12-27 20:17:17 +01:00
|
|
|
notify: restart mailu
|