2019-02-07 15:10:49 +08:00
|
|
|
global_defs {
|
|
|
|
}
|
|
|
|
|
2021-04-09 08:35:12 +08:00
|
|
|
vrrp_track_process check-l4lb {
|
|
|
|
process l4lb
|
2019-02-07 15:10:49 +08:00
|
|
|
weight -60
|
2021-04-09 08:35:12 +08:00
|
|
|
delay 3
|
2019-02-07 15:10:49 +08:00
|
|
|
}
|
|
|
|
|
2021-04-09 08:35:12 +08:00
|
|
|
vrrp_instance VI-01 {
|
2019-02-07 15:10:49 +08:00
|
|
|
state BACKUP
|
|
|
|
priority {{ 119 | random(61, 1) }}
|
|
|
|
unicast_src_ip {{ inventory_hostname }}
|
|
|
|
unicast_peer {
|
2021-01-19 17:41:00 +08:00
|
|
|
{% for h in groups['ex_lb'] %}{% if h != inventory_hostname %}
|
2019-02-07 15:10:49 +08:00
|
|
|
{{ h }}
|
|
|
|
{% endif %}{% endfor %}
|
|
|
|
}
|
|
|
|
dont_track_primary
|
|
|
|
interface {{ LB_IF }}
|
|
|
|
virtual_router_id {{ ROUTER_ID }}
|
|
|
|
advert_int 3
|
2021-04-09 08:35:12 +08:00
|
|
|
track_process {
|
|
|
|
check-l4lb
|
2019-02-07 15:10:49 +08:00
|
|
|
}
|
|
|
|
virtual_ipaddress {
|
2019-05-30 21:37:01 +08:00
|
|
|
{{ EX_APISERVER_VIP }}
|
2019-02-07 15:10:49 +08:00
|
|
|
}
|
|
|
|
}
|