Fix overwriting resolv conf and quote texts, add MX

This commit is contained in:
Alex 2020-08-09 11:55:57 +02:00
parent 8e2f773811
commit 33c4e6de98
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
3 changed files with 7 additions and 7 deletions

View File

@ -12,10 +12,9 @@
- unbound - unbound
- config - config
- name: Set unbound as default dns - name: Set unbound as default dns
replace: template:
path: /etc/resolv.conf src: 'resolv.conf'
regexp: "^nameserver.*$" dest: /etc/resolv.conf
replace: "nameserver 127.0.0.1"
tags: tags:
- unbound - unbound
- config - config

View File

@ -7,7 +7,7 @@ server:
local-data: "redxen.eu. IN SOA n0.redxen.eu admin.redxen.eu 2020053102 1800 120 604800 3600" local-data: "redxen.eu. IN SOA n0.redxen.eu admin.redxen.eu 2020053102 1800 120 604800 3600"
{% for record in unbound.public.TXT %} {% for record in unbound.public.TXT %}
local-data: "{{ record.name }}redxen.eu. 86400 IN TXT {{ record.content }}" local-data: '{{ record.name }}redxen.eu. 86400 IN TXT "{{ record.content }}" {% if record.content2|default(false) %}"{{ record.content2 }}"{% endif %}'
{% endfor %} {% endfor %}
{% for record in unbound.public.CNAME %} {% for record in unbound.public.CNAME %}
@ -18,8 +18,8 @@ server:
local-data: "_{{ record.service }}._{{ record.proto }}.redxen.eu. 86400 IN SRV 0 5 {{ record.port }} {{ record.host }}." local-data: "_{{ record.service }}._{{ record.proto }}.redxen.eu. 86400 IN SRV 0 5 {{ record.port }} {{ record.host }}."
{% endfor %} {% endfor %}
{% for record in unbound.public.A %} {% for record in unbound.public.MX %}
local-data: "{{ record.name }}redxen.eu. 86400 IN A {{ record.addr }}" local-data: "{{ record.name }}redxen.eu. 86400 IN MX {{ record.priority|default(10) }} {{ record.host }}"
{% endfor %} {% endfor %}
{% for domains in unbound.public.group.A %} {% for domains in unbound.public.group.A %}

1
templates/resolv.conf Normal file
View File

@ -0,0 +1 @@
nameserver 127.0.0.1