2015-03-30 22:02:32 +00:00
|
|
|
<% if data["zone"]["ttl"] -%>
|
|
|
|
$TTL <%= data["zone"]["ttl"] %>
|
|
|
|
<% end -%>
|
|
|
|
|
|
|
|
@ IN SOA <%= data["zone"]["soa"] %> <%= data["zone"]["hostmaster"] %> (
|
2015-01-18 18:22:19 +00:00
|
|
|
<%= data["zone"]["serial"] %> ; serial
|
|
|
|
<%= data["zone"]["refresh"] %> ; refresh
|
|
|
|
<%= data["zone"]["retry"] %> ; retry
|
|
|
|
<%= data["zone"]["expire"] %> ; expire
|
|
|
|
<%= data["zone"]["minimum"] %>) ; minimum
|
2015-03-30 22:02:32 +00:00
|
|
|
|
2015-01-18 18:22:19 +00:00
|
|
|
<% data["network"].each do |name, value| -%>
|
|
|
|
<% if value["ns"] -%>
|
2015-08-05 15:33:37 +00:00
|
|
|
NS <%= fqdn(name) %>
|
2015-01-18 18:22:19 +00:00
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
2014-08-18 08:29:43 +00:00
|
|
|
|
2015-03-30 22:02:32 +00:00
|
|
|
<% if data["zone"]["a"] -%>
|
|
|
|
A <%= data["zone"]["a"] %>
|
|
|
|
<% end -%>
|
|
|
|
<% if data["zone"]["aaaa"] -%>
|
|
|
|
AAAA <%= data["zone"]["aaaa"]%>
|
|
|
|
<% end -%>
|
2014-08-18 08:29:43 +00:00
|
|
|
<% data["network"].each do |name, value| %>
|
|
|
|
<% if value["cname"] -%>
|
2015-08-05 15:33:37 +00:00
|
|
|
<%= fqdn(name) %> CNAME <%= value["cname"] %>
|
2014-08-18 08:29:43 +00:00
|
|
|
<% end -%>
|
2015-01-03 16:57:39 +00:00
|
|
|
<% if value["srv"] -%>
|
2015-08-05 15:33:37 +00:00
|
|
|
<%= fqdn(name) %> SRV <%= value["srv"] %>
|
2015-01-03 16:57:39 +00:00
|
|
|
<% end -%>
|
2014-08-18 08:29:43 +00:00
|
|
|
<% if value["ipv4"] -%>
|
2015-08-05 15:33:37 +00:00
|
|
|
<%= fqdn(name) %> A <%= NetAddr::CIDR.create(value["ipv4"]).ip(Short: true) %>
|
|
|
|
ipv4.<%= fqdn(name) %> A <%= NetAddr::CIDR.create(value["ipv4"]).ip(Short: true) %>
|
2014-08-18 08:29:43 +00:00
|
|
|
<% end -%>
|
|
|
|
<% if value["ipv6"] -%>
|
2015-08-05 15:33:37 +00:00
|
|
|
<%= 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) %>
|
2014-08-18 08:29:43 +00:00
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|