server: local-zone: "redxen.localhost." static {% for host in groups['all'] %} local-data: "{{ host }}.redxen.localhost. 60 IN A {{ hostvars[host]['ansible_ens10']['ipv4']['address'] }}" {% endfor %} {% for entry in services.unbound.internal.local.SRV %} {% for host in groups[entry.group] %} local-data: "_{{ entry.service }}._tcp.redxen.localhost. 60 IN SRV 0 5 {{ entry.port }} {{ host }}.redxen.localhost." {% endfor %} {% endfor %} {% for entry in services.unbound.internal.local.CNAME %} local-data: "{{ entry.service }}.redxen.localhost. 60 IN CNAME {{ entry.host }}.redxen.localhost." {% endfor %}