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.
|
# IPv6 netmask length. Defaults to 64.
|
||||||
# $options:
|
# $options:
|
||||||
# Custom options for interface (used only on OpenBSD).
|
# Custom options for interface (used only on OpenBSD).
|
||||||
|
# $postcmd:
|
||||||
|
# Custom commands to be executed after interface is up (used only on
|
||||||
|
# OpenBSD).
|
||||||
#
|
#
|
||||||
# === Sample usage
|
# === Sample usage
|
||||||
#
|
#
|
||||||
|
@ -85,7 +88,7 @@ class network::helper::debian {
|
||||||
# netmask => "255.255.0.0",
|
# 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
|
include network::helper::restart
|
||||||
|
|
||||||
|
@ -257,6 +260,7 @@ define network::carp($password, $ipaddr, $netmask, $options = []) {
|
||||||
ipaddr => "${ipaddr}",
|
ipaddr => "${ipaddr}",
|
||||||
netmask => "${netmask}",
|
netmask => "${netmask}",
|
||||||
options => [ "vhid ${name}", "pass ${password}", $options ],
|
options => [ "vhid ${name}", "pass ${password}", $options ],
|
||||||
|
postcmd => [ "/usr/sbin/ndp -i carp${name} -- -accept_rtadv" ],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
centos,fedora: {
|
centos,fedora: {
|
||||||
|
|
|
@ -10,3 +10,6 @@ rtsol
|
||||||
<% elsif ip6addr != 'none' -%>
|
<% elsif ip6addr != 'none' -%>
|
||||||
inet6 alias <%= ip6addr %> <%= ip6netmask %>
|
inet6 alias <%= ip6addr %> <%= ip6netmask %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% postcmd.each do |val| -%>
|
||||||
|
!<%= val %>
|
||||||
|
<% end -%>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue