Added support for master and slave zones.

This commit is contained in:
Jussi 2012-01-19 12:34:52 +02:00 committed by Timo Mkinen
parent 655a0aaf0e
commit 21ffc24acf
4 changed files with 36 additions and 12 deletions

View file

@ -3,16 +3,24 @@
;
;
$TTL 86400
@ IN SOA ns1.<%= zone %>. root.<%= zone %>. (
$TTL 3600
<% master.each do |m| -%>
@ IN SOA <%= m['name'] %>. root.<%= zone %>. (
<%= Time.now.to_i %> ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
3600 ; Refresh
7200 ; Retry
604800 ; Expire
86400 ) ; Negative Cache TTL
<% end -%>
;
@ IN NS ns1.<%= zone %>.
ns1 IN A <%= ipaddr %>
<% master.each do |m| -%>
@ IN NS <%= m['name'] %>.
<% end -%>
<% if has_variable?(slaves) -%>
<% slaves.each do |slave| -%>
@ IN NS <%= slave['name'] %>.
<% end -%>
<% end -%>
$INCLUDE /etc/bind/db.<%= zone %>-dynamic
$INCLUDE /etc/bind/db.<%= zone %>-static