2020-10-11 12:06:32 +02:00
|
|
|
- name: website - get cert for nginx domain
|
|
|
|
notify: dehydrated
|
|
|
|
when: mailserver_mx_domain != ""
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/dehydrated/domains.txt
|
2021-01-13 03:13:58 +01:00
|
|
|
regexp: '(.+){{ mailserver_mx_domain }}(.*)?'
|
|
|
|
line: '\1{{ mailserver_mx_domain }}\2'
|
|
|
|
backrefs: yes
|
2020-10-11 12:06:32 +02:00
|
|
|
|
|
|
|
- name: website - nginx domain
|
|
|
|
notify: reload nginx
|
|
|
|
when: mailserver_mx_domain != ""
|
|
|
|
template:
|
|
|
|
src: mxdomain-website-domain.nginx
|
|
|
|
dest: /etc/nginx/sites.d/mxdomain.act
|
|
|
|
|
|
|
|
- name: website - directory
|
|
|
|
file:
|
|
|
|
state: directory
|
|
|
|
path: "/srv/http/{{ mailserver_mx_domain }}"
|
|
|
|
|
|
|
|
- name: website - index.html
|
|
|
|
template:
|
|
|
|
src: mxdomain-website.html
|
|
|
|
dest: "/srv/http/{{ mailserver_mx_domain }}/index.html"
|