Add ifstated to fsol-gw hosts
This commit is contained in:
parent
9d03799d40
commit
7b9c0b1f4d
3 changed files with 23 additions and 1 deletions
|
@ -8,5 +8,6 @@ network_carp_interfaces:
|
||||||
advskew: 128
|
advskew: 128
|
||||||
network_dns_servers: [172.20.20.10, 172.20.21.1, 172.20.21.2]
|
network_dns_servers: [172.20.20.10, 172.20.21.1, 172.20.21.2]
|
||||||
|
|
||||||
# use custom firewall config
|
# use custom firewall and ifstated config
|
||||||
firewall_src: pf.conf.gw_fsol
|
firewall_src: pf.conf.gw_fsol
|
||||||
|
ifstated_config: ifstated-fsol.conf
|
||||||
|
|
|
@ -37,3 +37,4 @@
|
||||||
- base
|
- base
|
||||||
- bird
|
- bird
|
||||||
- openvpn
|
- openvpn
|
||||||
|
- ifstated
|
||||||
|
|
20
roles/ifstated/files/ifstated-fsol.conf
Normal file
20
roles/ifstated/files/ifstated-fsol.conf
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
carp_up = "carp145.link.up"
|
||||||
|
|
||||||
|
state backup {
|
||||||
|
init {
|
||||||
|
run "/usr/local/sbin/birdc disable ospf1"
|
||||||
|
}
|
||||||
|
if $carp_up {
|
||||||
|
set-state master
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
state master {
|
||||||
|
init {
|
||||||
|
run "/usr/local/sbin/birdc enable ospf1"
|
||||||
|
}
|
||||||
|
if !$carp_up {
|
||||||
|
set-state backup
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue