27 lines
949 B
Dns
27 lines
949 B
Dns
$ORIGIN {{ rougail_variable }}.
|
|
$TTL 1800
|
|
|
|
@ IN SOA {{ domain_name_eth0 }}. admin.{{ rougail_variable }}. (
|
|
0000000000 ; serial number
|
|
3600 ; refresh
|
|
900 ; retry
|
|
1209600 ; expire
|
|
1800 ; ttl
|
|
)
|
|
; Name servers
|
|
|
|
{% set suffix = rougail_variable|normalize_family %}
|
|
{% for ns in nsd["nsd_zone_" + suffix]["ns_" + suffix] %}
|
|
NS {{ ns }}.
|
|
{% endfor %}
|
|
|
|
{% set hostnames = nsd["nsd_zone_" + suffix]["hostname_" + suffix]["hostname_" + suffix] %}
|
|
{% for nsd in hostnames %}
|
|
{% set type = nsd['type_' + suffix] %}
|
|
{% if type == 'A' %}
|
|
{% set value = nsd['ip_' + suffix] %}
|
|
{% else %}
|
|
{% set value = nsd['cname_' + suffix] + '.' %}
|
|
{% endif %}
|
|
{{ nsd }} {{ type }} {{ value }}
|
|
{% endfor %}
|