dataset/seed/nsd/templates/nsd.zone

28 lines
949 B
Dns
Raw Normal View History

2023-06-23 08:12:05 +02:00
$ORIGIN {{ rougail_variable }}.
2022-03-08 19:42:28 +01:00
$TTL 1800
2023-06-23 08:12:05 +02:00
@ IN SOA {{ domain_name_eth0 }}. admin.{{ rougail_variable }}. (
2022-05-04 10:29:03 +02:00
0000000000 ; serial number
2022-03-08 19:42:28 +01:00
3600 ; refresh
900 ; retry
1209600 ; expire
1800 ; ttl
)
; Name servers
2023-06-23 08:12:05 +02:00
{% set suffix = rougail_variable|normalize_family %}
{% for ns in nsd["nsd_zone_" + suffix]["ns_" + suffix] %}
NS {{ ns }}.
{% endfor %}
2022-03-08 19:42:28 +01:00
2023-06-23 08:12:05 +02:00
{% 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 %}