dn42-scripts/templates/dn42-zone.erb

25 lines
859 B
Plaintext
Raw Normal View History

2015-01-13 07:19:32 +00:00
@ IN SOA <%= data["zone"]["soa"] %> hostmaster (
<%= data["zone"]["serial"] %> ; serial
<%= data["zone"]["refresh"] %> ; refresh
<%= data["zone"]["retry"] %> ; retry
<%= data["zone"]["expire"] %> ; expire
<%= data["zone"]["minimum"] %>) ; minimum
NS <%= data["zone"]["ns"] %>
<% data["network"].each do |name, value| %>
<% if value["cname"] -%>
<%= name %> CNAME <%= value["cname"] %>
<% end -%>
<% if value["srv"] -%>
<%= name %> SRV <%= value["srv"] %>
<% end -%>
<% if value["ipv4"] -%>
<%= name %> A <%= ip(value["ipv4"]) %>
ipv4.<%= name %> A <%= ip(value["ipv4"]) %>
<% end -%>
<% if value["ipv6"] -%>
<%= name %> AAAA <%= ip(value["ipv6"]) %>
ipv6.<%= name %> AAAA <%= ip(value["ipv6"]) %>
<% end -%>
<% end -%>