Some more work on the dns module. The only thing not working for some reason is the zone.slae.erb for an unknown reason.
This commit is contained in:
parent
da1eef4333
commit
bd4cc55ce1
6 changed files with 50 additions and 45 deletions
|
@ -2,26 +2,25 @@
|
|||
; BIND data file for <%= zone %>
|
||||
;
|
||||
;
|
||||
|
||||
$TTL 3600
|
||||
$ORIGIN <%= zone %>.
|
||||
<% master.each do |m| -%>
|
||||
@ IN SOA <%= m['name'] %>. root.<%= zone %>. (
|
||||
<% master.each_pair do |k, v| %>
|
||||
@ IN SOA <%= v['ns'] %>. hostmaster.<%= zone %>. (
|
||||
<%= Time.now.to_i %> ; Serial
|
||||
3600 ; Refresh
|
||||
7200 ; Retry
|
||||
604800 ; Expire
|
||||
86400 ) ; Negative Cache TTL
|
||||
<% end -%>
|
||||
;
|
||||
<% master.each do |m| -%>
|
||||
@ IN NS <%= m['name'] %>.
|
||||
@ IN NS <%= v['ns'] %>.
|
||||
<% end -%>
|
||||
<% if has_variable?(slaves) -%>
|
||||
<% slaves.each do |slave| -%>
|
||||
@ IN NS <%= slave['name'] %>.
|
||||
<% end -%>
|
||||
<% slaves.each_pair do |k, v| -%>
|
||||
@ IN NS <%= v['ns'] %>.
|
||||
<% end -%>
|
||||
|
||||
<% if zone.match(/\//) %>
|
||||
$INCLUDE <%= zonedir %>/db.<%= zone.sub(/\//, '-') %>-dynamic
|
||||
$INCLUDE <%= zonedir %>/db.<%= zone.sub(/\//, '-') %>-static
|
||||
<% else %>
|
||||
$INCLUDE <%= zonedir %>/db.<%= zone %>-dynamic
|
||||
$INCLUDE <%= zonedir %>/db.<%= zone %>-static
|
||||
<% end -%>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue