haproxy-wi/app/scripts/ansible/roles/udp/templates/keepalived-udp.conf.j2

20 lines
460 B
Django/Jinja

virtual_server {{ vip }} {{ port }} {
lb_algo {{ lb_algo }}
lb_kind NAT
protocol UDP
delay_loop 10
delay_before_retry 10
retry 3
{% for server in config %}
real_server {{ server.backend_ip }} {{ server.port }} {
weight {{ server.weight }}
MISC_CHECK {
misc_path "{{ service_dir }}/checks/udp_check.sh {{ server.backend_ip }} {{ server.port }}"
misc_timeout 5
}
}
{% endfor %}
}