ansible-role-mailserver/tasks/website.yml

24 lines
614 B
YAML
Raw Normal View History

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
line: "{{ mailserver_mx_domain }}"
- 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"