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",
|
||||
$dnsnameservers = "none", $dnssearch = "none",
|
||||
$dnsnameservers = "none", $dnssearch = "none",
|
||||
$ip6addr = "none", $ip6netmask = "64",
|
||||
$bridge = [], $options = [], $postcmd = []) {
|
||||
|
||||
|
@ -358,14 +358,14 @@ define network::route($gateway = "", $device, $ipv6gateway = "") {
|
|||
# password => "secret",
|
||||
# }
|
||||
#
|
||||
define network::carp($password, $ipaddr, $netmask, $options = []) {
|
||||
define network::carp($password, $ipaddr, $netmask, $options = [], $postcmd = []) {
|
||||
case $::operatingsystem {
|
||||
"openbsd": {
|
||||
network::interface { "carp${name}":
|
||||
ipaddr => $ipaddr,
|
||||
netmask => $netmask,
|
||||
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": {
|
||||
|
|
Loading…
Add table
Reference in a new issue