Added initial support for dynamic dns zones
This commit is contained in:
parent
347ce1c2c2
commit
16e92d694f
2 changed files with 63 additions and 10 deletions
25
dns/templates/zone.dynamic.erb
Normal file
25
dns/templates/zone.dynamic.erb
Normal file
|
@ -0,0 +1,25 @@
|
|||
key "<%= zone %>" {
|
||||
algorithm <%= keytype %>;
|
||||
secret "<%= key %>";
|
||||
};
|
||||
|
||||
zone "<%= zone %>" {
|
||||
type master;
|
||||
<% if zone.match(/\//) -%>
|
||||
file "<%= zonedir %>/db.<%= zone.sub(/\//, '-') %>";
|
||||
<% else -%>
|
||||
file "<%= zonedir %>/db.<%= zone %>";
|
||||
<% end -%>
|
||||
allow-transfer {
|
||||
<% if slaves != [] -%>
|
||||
<% slaves.each_pair do |k, v| -%>
|
||||
<%= v['ip'] %>;
|
||||
<% end -%>
|
||||
<% else -%>
|
||||
nameservers;
|
||||
<% end -%>
|
||||
};
|
||||
allow-update {
|
||||
key <%= zone %>;
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue