Ansible-HAProxy-Failover/roles/haproxy/templates/keepalived.conf.j2

32 lines
804 B
Text
Raw Permalink Normal View History

2021-09-23 09:54:34 -06:00
vrrp_track_process track_haproxy {
process haproxy
weight {{ haproxy_keepalived_process_weight }}
}
vrrp_instance VI_1 {
{% if haproxy_keepalived_adapter_vlan != '' %}
interface {{ haproxy_keepalived_adapter }}.{{ haproxy_keepalived_adapter_vlan }}
{% else %}
interface {{ haproxy_keepalived_adapter }}
{% endif %}
state {{ haproxy_shared_state }}
virtual_router_id {{ haproxy_shared_virtual_router_id }}
priority {{ haproxy_shared_priority }}
2022-08-23 09:29:21 -06:00
{% if haproxy_shared_password != '' %}
authentication {
auth_type PASS
auth_pass {{ haproxy_shared_password }}
}
{% endif %}
2021-09-23 09:54:34 -06:00
virtual_ipaddress {
{{ haproxy_shared_ip }}{{ haproxy_shared_ip_subnet }} dev {{ haproxy_bind_adapter }}
}
track_process {
track_haproxy
}
}