Fixed DNS templates and added support for Ubuntu 12.04 's way of creating resolv.conf.
This commit is contained in:
parent
f72325de30
commit
b6d34a1cf2
4 changed files with 18 additions and 1 deletions
|
@ -14,9 +14,11 @@ $ORIGIN <%= zone %>.
|
||||||
;
|
;
|
||||||
@ IN NS <%= v['ns'] %>.
|
@ IN NS <%= v['ns'] %>.
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% if slaves != [] %>
|
||||||
<% slaves.each_pair do |k, v| -%>
|
<% slaves.each_pair do |k, v| -%>
|
||||||
@ IN NS <%= v['ns'] %>.
|
@ IN NS <%= v['ns'] %>.
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% end -%>
|
||||||
<% if zone.match(/\//) %>
|
<% if zone.match(/\//) %>
|
||||||
$INCLUDE <%= zonedir %>/db.<%= zone.sub(/\//, '-') %>-dynamic
|
$INCLUDE <%= zonedir %>/db.<%= zone.sub(/\//, '-') %>-dynamic
|
||||||
$INCLUDE <%= zonedir %>/db.<%= zone.sub(/\//, '-') %>-static
|
$INCLUDE <%= zonedir %>/db.<%= zone.sub(/\//, '-') %>-static
|
||||||
|
|
|
@ -5,6 +5,10 @@ zone "<%= zone %>" {
|
||||||
<% else -%>
|
<% else -%>
|
||||||
file "<%= zonedir %>/db.<%= zone %>";
|
file "<%= zonedir %>/db.<%= zone %>";
|
||||||
<% end -%>
|
<% end -%>
|
||||||
masters { <%= master %>; };
|
masters {
|
||||||
|
<% masters.each_pair do |k, v| -%>
|
||||||
|
<%= v['ip'] %>;
|
||||||
|
<% end -%>
|
||||||
|
};
|
||||||
allow-transfer { none; };
|
allow-transfer { none; };
|
||||||
};
|
};
|
||||||
|
|
|
@ -109,6 +109,10 @@ class network::hostname {
|
||||||
# Ethernet address. Overrides udev configuration.
|
# Ethernet address. Overrides udev configuration.
|
||||||
# $netmask:
|
# $netmask:
|
||||||
# Netmask for interface. Required only when $ipaddr is used.
|
# Netmask for interface. Required only when $ipaddr is used.
|
||||||
|
# $dnsnameservers:
|
||||||
|
# IP addresses of DNS name servers (separated by space).
|
||||||
|
# $dnssearch:
|
||||||
|
# Search list for domain name lookup (separated by space).
|
||||||
# $ip6addr:
|
# $ip6addr:
|
||||||
# IPv6 address for interface. Use auto for autoconfigured address.
|
# IPv6 address for interface. Use auto for autoconfigured address.
|
||||||
# Defaults to none.
|
# Defaults to none.
|
||||||
|
@ -130,6 +134,7 @@ class network::hostname {
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
define network::interface($ipaddr = "none", $eaddr = "none", $netmask = "none",
|
define network::interface($ipaddr = "none", $eaddr = "none", $netmask = "none",
|
||||||
|
$dnsnameservers = "none", $dnssearch = "none",
|
||||||
$ip6addr = "none", $ip6netmask = "64",
|
$ip6addr = "none", $ip6netmask = "64",
|
||||||
$bridge = [], $options = [], $postcmd = []) {
|
$bridge = [], $options = [], $postcmd = []) {
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,12 @@ iface <%= name %> inet <%= proto %>
|
||||||
<% if netmask != 'none' -%>
|
<% if netmask != 'none' -%>
|
||||||
netmask <%= netmask %>
|
netmask <%= netmask %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% if dnssearch != 'none' -%>
|
||||||
|
dns-search <%= dnssearch %>
|
||||||
|
<% end -%>
|
||||||
|
<% if dnsnameservers != 'none' -%>
|
||||||
|
dns-nameservers <%= dnsnameservers %>
|
||||||
|
<% end -%>
|
||||||
<% options.each do |val| -%>
|
<% options.each do |val| -%>
|
||||||
<%= val %>
|
<%= val %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
Loading…
Add table
Reference in a new issue