2022-07-04 15:44:18 +02:00
|
|
|
address: '%%domain_name_eth0'
|
|
|
|
addresses:
|
|
|
|
%if %%getVar('dns_client_address', None)
|
|
|
|
- dns_address: '%%dns_client_address'
|
|
|
|
dns_ip: '%%ip_dns'
|
2022-08-18 10:19:43 +02:00
|
|
|
%elif %%getVar('unbound_forward_address', None) is not None
|
2022-07-04 15:44:18 +02:00
|
|
|
%for %%authority in %%unbound_forward_address
|
|
|
|
- dns_address: %%authority
|
2022-12-25 17:08:52 +01:00
|
|
|
dns_ip: %%authority.unbound_allowed_client
|
2022-07-04 15:44:18 +02:00
|
|
|
%end for
|
2022-12-25 17:08:52 +01:00
|
|
|
%elif %%getVar('nsd_zones', None)
|
2022-08-18 10:19:43 +02:00
|
|
|
%for %%zone in %%nsd_zones
|
2022-07-04 15:44:18 +02:00
|
|
|
%set %%suffix = %%normalize_family(%%zone)
|
|
|
|
%set %%hostnames = %%nsd["nsd_zone_" + %%suffix]["hostname_" + %%suffix]["hostname_" + %%suffix]
|
2022-12-25 17:08:52 +01:00
|
|
|
%for %%hostname in %%hostnames
|
|
|
|
- dns_address: %%{hostname}.%%zone
|
|
|
|
dns_ip: %%hostname["ip_" + %%suffix]
|
2022-07-04 15:44:18 +02:00
|
|
|
%end for
|
|
|
|
%end for
|
|
|
|
%end if
|
|
|
|
%if %%dns_is_only_local
|
|
|
|
dns_is_only_local: true
|
|
|
|
%else
|
|
|
|
dns_is_only_local: false
|
|
|
|
%end if
|