routing/roles/keepalived/templates/keepalived.conf.j2
2024-09-15 09:42:20 +02:00

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 %}