28 lines
646 B
Django/Jinja
28 lines
646 B
Django/Jinja
# {{ ansible_managed }}
|
|
vrrp_sync_group G1 {
|
|
group {
|
|
{%for iface in keepalived_interfaces %}
|
|
{{ iface.name }}
|
|
{% endfor %}
|
|
}
|
|
}
|
|
|
|
{%for iface in keepalived_interfaces %}
|
|
vrrp_instance {{ iface.name }} {
|
|
state {{ keepalived_init_state | default('BACKUP') }}
|
|
interface {{ iface.interface | default(iface.name) }}
|
|
virtual_router_id 42
|
|
priority {{ keepalived_host_prio }}
|
|
advert_int 2
|
|
authentication {
|
|
auth_type PASS
|
|
auth_pass {{ iface.password | default(keepalived_password) }}
|
|
}
|
|
virtual_ipaddress {
|
|
{% for addr in iface.addresses %}
|
|
{{ addr }}
|
|
{% endfor %}
|
|
}
|
|
}
|
|
{% endfor %}
|