Skip to content
Snippets Groups Projects
Commit e7b26735 authored by ale's avatar ale
Browse files

Do not generate unnecessary nameserver A records

parent d167a73b
No related branches found
No related tags found
1 merge request!249Support IPv6-only networks
Pipeline #25227 passed
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if d == mx_ns_domain %}
{# Only generate the nameservers' A records on the chosen zone #}
{% for h in services['dns'].hosts | sort %} {% for h in services['dns'].hosts | sort %}
{% set host_ip4 = hostvars[h]['public_ips'] | ansible.netcommon.ipv4 %} {% set host_ip4 = hostvars[h]['public_ips'] | ansible.netcommon.ipv4 %}
{% set host_ip6 = hostvars[h]['public_ips'] | ansible.netcommon.ipv6 %} {% set host_ip6 = hostvars[h]['public_ips'] | ansible.netcommon.ipv6 %}
...@@ -55,6 +57,8 @@ ...@@ -55,6 +57,8 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endif %}
{% for service_name, s in services|dictsort %} {% for service_name, s in services|dictsort %}
{# Iterate over the HTTP endpoints #} {# Iterate over the HTTP endpoints #}
{% for pe in s.get('public_endpoints', []) if pe.get('name') and not pe.get('skip_dns', False) %} {% for pe in s.get('public_endpoints', []) if pe.get('name') and not pe.get('skip_dns', False) %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment