keepalived: add minimal support for virtual_routes
This commit is contained in:
parent
c7d7320367
commit
61cdb980ea
2 changed files with 19 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
keepalived__virtual_addresses: {}
|
||||
keepalived__virtual_routes: {}
|
||||
keepalived__notify_master: []
|
||||
keepalived__notify_backup: []
|
||||
keepalived__notify_fault: []
|
||||
|
|
|
@ -55,6 +55,15 @@ vrrp_instance instance_v4 {
|
|||
{{ address }} dev {{ dev }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
}
|
||||
virtual_routes {
|
||||
{% for dev, addresses in keepalived__virtual_routes.items() %}
|
||||
{% for address in addresses %}
|
||||
{% if address | ansible.utils.ipv4 %}
|
||||
{{ address }} dev {{ dev }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
}
|
||||
{% if not (ipv4_enabled and ipv6_enabled) %}
|
||||
|
@ -81,6 +90,15 @@ vrrp_instance instance_v6 {
|
|||
{{ address }} dev {{ dev }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
}
|
||||
virtual_routes {
|
||||
{% for dev, addresses in keepalived__virtual_routes.items() %}
|
||||
{% for address in addresses %}
|
||||
{% if address | ansible.utils.ipv6 %}
|
||||
{{ address }} dev {{ dev }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
}
|
||||
{% if not (ipv4_enabled and ipv6_enabled) %}
|
||||
|
|
Loading…
Reference in a new issue