network: Add keepalived support
This commit is contained in:
parent
a1d4d732ba
commit
d187472f27
3 changed files with 48 additions and 0 deletions
22
roles/network/templates/keepalived.conf.j2
Normal file
22
roles/network/templates/keepalived.conf.j2
Normal 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 %}
|
Loading…
Add table
Add a link
Reference in a new issue