Updated all templates to use instance variables

This commit is contained in:
Ossi Salmi 2013-05-05 00:07:55 +03:00
parent a0c854d3c0
commit dc51af1ca2
113 changed files with 527 additions and 522 deletions

View file

@ -1,11 +1,11 @@
;
; BIND data file for <%= zone %>
; BIND data file for <%= @zone %>
;
;
$TTL 3600
$ORIGIN <%= zone %>.
<% master.each_pair do |k, v| %>
@ IN SOA <%= v['ns'] %>. <%= soacontact %>. (
$ORIGIN <%= @zone %>.
<% @master.each_pair do |k, v| %>
@ IN SOA <%= v['ns'] %>. <%= @soacontact %>. (
<%= Time.now.to_i %> ; Serial
3600 ; Refresh
7200 ; Retry
@ -14,15 +14,15 @@ $ORIGIN <%= zone %>.
;
@ IN NS <%= v['ns'] %>.
<% end -%>
<% if slaves != [] %>
<% slaves.each_pair do |k, v| -%>
<% if @slaves != [] %>
<% @slaves.each_pair do |k, v| -%>
@ IN NS <%= v['ns'] %>.
<% end -%>
<% end -%>
<% if zone.match(/\//) %>
$INCLUDE <%= zonedir %>/db.<%= zone.sub(/\//, '-') %>-dynamic
$INCLUDE <%= zonedir %>/db.<%= zone.sub(/\//, '-') %>-static
<% 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
$INCLUDE <%= @zonedir %>/db.<%= @zone %>-dynamic
$INCLUDE <%= @zonedir %>/db.<%= @zone %>-static
<% end -%>