Add ns02.home.foo.sh host
This commit is contained in:
parent
69c17d7e12
commit
c9f3b7d0b7
5 changed files with 81 additions and 0 deletions
32
roles/ifstated/files/ifstated-ns.conf
Normal file
32
roles/ifstated/files/ifstated-ns.conf
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
init-state auto
|
||||
|
||||
if_carp_up="carp157.link.up"
|
||||
if_carp_down="carp157.link.down"
|
||||
|
||||
state auto {
|
||||
if $if_carp_up {
|
||||
set-state master
|
||||
}
|
||||
if $if_carp_down {
|
||||
set-state backup
|
||||
}
|
||||
}
|
||||
|
||||
state master {
|
||||
init {
|
||||
run "route delete default && route add default 37.16.96.145"
|
||||
}
|
||||
if $if_carp_down {
|
||||
set-state backup
|
||||
}
|
||||
}
|
||||
|
||||
state backup {
|
||||
init {
|
||||
run "route delete default && route add default 172.20.20.1"
|
||||
}
|
||||
if $if_carp_up {
|
||||
set-state master
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue