2015-07-24 14:59:25 +00:00
|
|
|
vrrp_script check_alive {
|
|
|
|
script "/check_alive.sh"
|
|
|
|
interval 2
|
2015-08-05 11:10:53 +00:00
|
|
|
fall 2
|
|
|
|
rise 10
|
2015-07-24 14:59:25 +00:00
|
|
|
}
|
|
|
|
|
2016-03-31 15:32:00 -03:00
|
|
|
vrrp_instance kolla_internal_vip_{{ keepalived_virtual_router_id }} {
|
2016-03-14 01:36:33 +00:00
|
|
|
state BACKUP
|
|
|
|
nopreempt
|
2015-07-24 14:59:25 +00:00
|
|
|
interface {{ api_interface }}
|
2016-03-31 15:32:00 -03:00
|
|
|
virtual_router_id {{ keepalived_virtual_router_id }}
|
2015-09-10 13:22:00 +03:00
|
|
|
priority {{ groups['haproxy'].index(inventory_hostname) + 1 }}
|
2015-07-24 14:59:25 +00:00
|
|
|
advert_int 1
|
|
|
|
virtual_ipaddress {
|
2016-03-30 21:26:19 -04:00
|
|
|
{{ kolla_internal_vip_address }} dev {{ api_interface }}
|
2016-02-18 13:50:39 -05:00
|
|
|
{% if haproxy_enable_external_vip | bool %}
|
2016-03-30 21:26:19 -04:00
|
|
|
{{ kolla_external_vip_address }} dev {{ kolla_external_vip_interface }}
|
|
|
|
{% endif %}
|
|
|
|
}
|
|
|
|
{% if haproxy_enable_external_vip | bool and api_interface != kolla_external_vip_interface %}
|
|
|
|
track_interface {
|
|
|
|
{{ kolla_external_vip_interface }}
|
2016-02-18 13:50:39 -05:00
|
|
|
}
|
2016-03-30 21:26:19 -04:00
|
|
|
{% endif %}
|
2016-02-06 22:18:01 +08:00
|
|
|
authentication {
|
|
|
|
auth_type PASS
|
|
|
|
auth_pass {{ keepalived_password }}
|
|
|
|
}
|
2016-02-18 13:50:39 -05:00
|
|
|
track_script {
|
|
|
|
check_alive
|
|
|
|
}
|
|
|
|
}
|