network: Add keepalived support

This commit is contained in:
Timo Makinen 2021-03-19 17:09:17 +00:00
parent a1d4d732ba
commit d187472f27
3 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,22 @@
! {{ ansible_managed }}
global_defs {
}
{% for vip in network_vip_interfaces %}
vrrp_instance VI_{{ vip.vhid }} {
interface {{ vip.device }}
virtual_router_id {{ vip.vhid }}
{% if vip.priority is defined %}
priority {{ vip.priority }}
{% endif %}
authentication {
auth_type AH
auth_pass {{ vip.pass }}
}
virtual_ipaddress {
{{ vip.ipaddr }}
}
}
{% endfor %}