Added postcmd option to network::interface and removed ipv6 autoconfiguration from OpenBSD carp interfaces.
This commit is contained in:
parent
c3d3bf2785
commit
d5df1b9692
2 changed files with 8 additions and 1 deletions
|
@ -77,6 +77,9 @@ class network::helper::debian {
|
|||
# IPv6 netmask length. Defaults to 64.
|
||||
# $options:
|
||||
# Custom options for interface (used only on OpenBSD).
|
||||
# $postcmd:
|
||||
# Custom commands to be executed after interface is up (used only on
|
||||
# OpenBSD).
|
||||
#
|
||||
# === Sample usage
|
||||
#
|
||||
|
@ -85,7 +88,7 @@ class network::helper::debian {
|
|||
# netmask => "255.255.0.0",
|
||||
# }
|
||||
#
|
||||
define network::interface($options = [], $ipaddr = "none", $eaddr = "none", $netmask = "none", $ip6addr = "none", $ip6netmask = "64") {
|
||||
define network::interface($options = [], $ipaddr = "none", $eaddr = "none", $netmask = "none", $ip6addr = "none", $ip6netmask = "64", $postcmd = []) {
|
||||
|
||||
include network::helper::restart
|
||||
|
||||
|
@ -257,6 +260,7 @@ define network::carp($password, $ipaddr, $netmask, $options = []) {
|
|||
ipaddr => "${ipaddr}",
|
||||
netmask => "${netmask}",
|
||||
options => [ "vhid ${name}", "pass ${password}", $options ],
|
||||
postcmd => [ "/usr/sbin/ndp -i carp${name} -- -accept_rtadv" ],
|
||||
}
|
||||
}
|
||||
centos,fedora: {
|
||||
|
|
|
@ -10,3 +10,6 @@ rtsol
|
|||
<% elsif ip6addr != 'none' -%>
|
||||
inet6 alias <%= ip6addr %> <%= ip6netmask %>
|
||||
<% end -%>
|
||||
<% postcmd.each do |val| -%>
|
||||
!<%= val %>
|
||||
<% end -%>
|
||||
|
|
Loading…
Add table
Reference in a new issue