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
|
@ -109,6 +109,10 @@ class network::hostname {
|
|||
# Ethernet address. Overrides udev configuration.
|
||||
# $netmask:
|
||||
# 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:
|
||||
# IPv6 address for interface. Use auto for autoconfigured address.
|
||||
# Defaults to none.
|
||||
|
@ -130,6 +134,7 @@ class network::hostname {
|
|||
# }
|
||||
#
|
||||
define network::interface($ipaddr = "none", $eaddr = "none", $netmask = "none",
|
||||
$dnsnameservers = "none", $dnssearch = "none",
|
||||
$ip6addr = "none", $ip6netmask = "64",
|
||||
$bridge = [], $options = [], $postcmd = []) {
|
||||
|
||||
|
|
|
@ -11,6 +11,12 @@ iface <%= name %> inet <%= proto %>
|
|||
<% if netmask != 'none' -%>
|
||||
netmask <%= netmask %>
|
||||
<% end -%>
|
||||
<% if dnssearch != 'none' -%>
|
||||
dns-search <%= dnssearch %>
|
||||
<% end -%>
|
||||
<% if dnsnameservers != 'none' -%>
|
||||
dns-nameservers <%= dnsnameservers %>
|
||||
<% end -%>
|
||||
<% options.each do |val| -%>
|
||||
<%= val %>
|
||||
<% end -%>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue