Added IPv6 support for network module.
This commit is contained in:
parent
2592ca9fad
commit
61c3a1d3a3
3 changed files with 16 additions and 1 deletions
|
@ -34,6 +34,11 @@ class network::helper::restart {
|
|||
# if interface just needs to be brought up. Defaults to none.
|
||||
# $netmask:
|
||||
# Netmask for interface. Required only when $ipaddr is used.
|
||||
# $ip6addr:
|
||||
# IPv6 address for interface. Use auto for autoconfigured address.
|
||||
# Defaults to none.
|
||||
# $ip6netmask:
|
||||
# IPv6 netmask length. Defaults to 64.
|
||||
# $options:
|
||||
# Custom options for interface (used only on OpenBSD).
|
||||
#
|
||||
|
@ -44,7 +49,7 @@ class network::helper::restart {
|
|||
# netmask => "255.255.0.0",
|
||||
# }
|
||||
#
|
||||
define network::interface($options = [], $ipaddr = "none", $netmask = "none") {
|
||||
define network::interface($options = [], $ipaddr = "none", $netmask = "none", ip6addr = "none", ip6netmask = "64") {
|
||||
|
||||
include network::helper::restart
|
||||
|
||||
|
|
|
@ -5,3 +5,8 @@ up
|
|||
<% else -%>
|
||||
inet <%= ipaddr %> <%= netmask %> NONE<% options.each do |val| %> <%= val %><% end %>
|
||||
<% end -%>
|
||||
<% if ip6addr == 'auto' -%>
|
||||
rtsol
|
||||
<% elsif ip6addr != 'none' -%>
|
||||
inet6 alias <%= ip6addr %> <%= ip6netmask %>
|
||||
<% end -%>
|
||||
|
|
|
@ -18,6 +18,11 @@ DHCPCLASS=
|
|||
PERSISTENT_DHCLIENT=yes
|
||||
NOZEROCONF=yes
|
||||
<% end -%>
|
||||
<% if ip6addr == 'none' -%>
|
||||
IPV6INIT=no
|
||||
<% elsif ip6addr != 'auto' -%>
|
||||
IPV6ADDR=<%= ip6addr %>/<%= ip6netmask %>
|
||||
<% end -%>
|
||||
<% options.each do |val| -%>
|
||||
<%= val %>
|
||||
<% end -%>
|
||||
|
|
Loading…
Add table
Reference in a new issue