From 7e4eba3ac9525edfed9a69b0f16ea0f343a2491e Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 10 May 2020 17:04:42 +0200 Subject: [PATCH] Swap CNAME for A --- templates/internal.conf.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/internal.conf.j2 b/templates/internal.conf.j2 index ee4e5fa..dacfcf1 100644 --- a/templates/internal.conf.j2 +++ b/templates/internal.conf.j2 @@ -10,6 +10,8 @@ server: {% endfor %} {% endfor %} -{% for entry in services.unbound.internal.local.CNAME %} - local-data: "{{ entry.service }}.redxen.localhost. 60 IN CNAME {{ entry.host }}.redxen.localhost." +{% for entry in services.unbound.internal.local.A %} +{% for host in groups[entry.group] %} + local-data: "{{ entry.service }}.redxen.localhost. 60 IN A {{ hostvars[host]['ansible_ens10']['ipv4']['address'] }}" +{% endfor %} {% endfor %}