44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
<% if data["zone"]["ttl"] -%>
|
|
$TTL <%= data["zone"]["ttl"] %>
|
|
<% end -%>
|
|
|
|
@ IN SOA <%= data["zone"]["soa"] %> <%= data["zone"]["hostmaster"] %> (
|
|
<%= data["zone"]["serial"] %> ; serial
|
|
<%= data["zone"]["refresh"] %> ; refresh
|
|
<%= data["zone"]["retry"] %> ; retry
|
|
<%= data["zone"]["expire"] %> ; expire
|
|
<%= data["zone"]["minimum"] %>) ; minimum
|
|
|
|
<% data["network"].each do |name, value| -%>
|
|
<% if value["ns"] -%>
|
|
NS <%= fqdn(name) %>
|
|
<% end -%>
|
|
<% end -%>
|
|
|
|
<% if data["zone"]["a"] -%>
|
|
A <%= data["zone"]["a"] %>
|
|
<% end -%>
|
|
<% if data["zone"]["aaaa"] -%>
|
|
AAAA <%= data["zone"]["aaaa"]%>
|
|
<% end -%>
|
|
<% data["network"].each do |name, value| %>
|
|
<% if value["cname"] -%>
|
|
<%= fqdn(name) %> CNAME <%= value["cname"] %>
|
|
<% end -%>
|
|
<% if value["srv"] -%>
|
|
<%= fqdn(name) %> SRV <%= value["srv"] %>
|
|
<% end -%>
|
|
<% if value["ipv4"] -%>
|
|
<%= fqdn(name) %> A <%= NetAddr::CIDR.create(value["ipv4"]).ip(Short: true) %>
|
|
ipv4.<%= fqdn(name) %> A <%= NetAddr::CIDR.create(value["ipv4"]).ip(Short: true) %>
|
|
<% end -%>
|
|
<% if value["ipv6"] -%>
|
|
<%= fqdn(name) %> AAAA <%= NetAddr::CIDR.create(value["ipv6"]).ip(Short: true) %>
|
|
ipv6.<%= fqdn(name) %> AAAA <%= NetAddr::CIDR.create(value["ipv6"]).ip(Short: true) %>
|
|
<% end -%>
|
|
<% if value["ula"] -%>
|
|
<%= fqdn(name) %> AAAA <%= NetAddr::CIDR.create(value["ula"]).ip(Short: true) %>
|
|
ula.<%= fqdn(name) %> AAAA <%= NetAddr::CIDR.create(value["ula"]).ip(Short: true) %>
|
|
<% end -%>
|
|
<% end -%>
|