network: Added postcmd paramter for network::carp
This commit is contained in:
parent
0075b0aa02
commit
58b1817263
1 changed files with 3 additions and 3 deletions
|
@ -150,7 +150,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",
|
$dnsnameservers = "none", $dnssearch = "none",
|
||||||
$ip6addr = "none", $ip6netmask = "64",
|
$ip6addr = "none", $ip6netmask = "64",
|
||||||
$bridge = [], $options = [], $postcmd = []) {
|
$bridge = [], $options = [], $postcmd = []) {
|
||||||
|
|
||||||
|
@ -358,14 +358,14 @@ define network::route($gateway = "", $device, $ipv6gateway = "") {
|
||||||
# password => "secret",
|
# password => "secret",
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
define network::carp($password, $ipaddr, $netmask, $options = []) {
|
define network::carp($password, $ipaddr, $netmask, $options = [], $postcmd = []) {
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
"openbsd": {
|
"openbsd": {
|
||||||
network::interface { "carp${name}":
|
network::interface { "carp${name}":
|
||||||
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" ],
|
postcmd => merge([ "/usr/sbin/ndp -i carp${name} -- -accept_rtadv" ], $postcmd),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"centos","redhat","fedora": {
|
"centos","redhat","fedora": {
|
||||||
|
|
Loading…
Add table
Reference in a new issue