vrrp_instance VI_{{ x }} {
state {{ states[x] }}
priority {{ priorities[x] }}
- interface {{ interface }}
- virtual_router_id {{ 50 + x }}
+ interface {{ vrrp_interfaces[x] }}
+ virtual_router_id {{ first_virtual_router_id + x }}
advert_int 1
authentication {
auth_type PASS
auth_pass {{ password }}
}
- unicast_src_ip {{ host_ip }}
+{% if not spec.use_keepalived_multicast %}
+ unicast_src_ip {{ host_ips[x] }}
unicast_peer {
- {% for ip in other_ips %}
+ {% for ip in other_ips[x] %}
{{ ip }}
{% endfor %}
}
+{% endif %}
virtual_ipaddress {
- {{ virtual_ips[x] }} dev {{ interface }}
+ {{ virtual_ips[x] }} dev {{ interfaces[x] }}
}
track_script {
check_backend