diff --git a/tasks/website.yml b/tasks/website.yml index dfcb4a2..196a544 100644 --- a/tasks/website.yml +++ b/tasks/website.yml @@ -3,7 +3,9 @@ when: mailserver_mx_domain != "" lineinfile: path: /etc/dehydrated/domains.txt - line: "{{ mailserver_mx_domain }}" + regexp: '(.+){{ mailserver_mx_domain }}(.*)?' + line: '\1{{ mailserver_mx_domain }}\2' + backrefs: yes - name: website - nginx domain notify: reload nginx