keepalived: add blackhole routes
This commit is contained in:
parent
14288224b4
commit
e87de918db
2 changed files with 8 additions and 0 deletions
|
@ -100,6 +100,8 @@
|
|||
keepalived__virtual_routes:
|
||||
ext0:
|
||||
- 45.66.111.204/30
|
||||
keepalived__virtual_blackholes:
|
||||
- 45.66.111.200/30
|
||||
keepalived__main: "{{ inventory_hostname_short == 'infra-1' }}"
|
||||
roles:
|
||||
- keepalived
|
||||
|
|
|
@ -71,6 +71,9 @@ vrrp_instance instance_v4 {
|
|||
{{ address }} dev {{ dev }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% for address in keepalived__virtual_blackholes | ansible.utils.ipv4 %}
|
||||
blackhole {{ address }}
|
||||
{% endfor %}
|
||||
}
|
||||
{% if not (ipv4_enabled and ipv6_enabled) %}
|
||||
|
@ -106,6 +109,9 @@ vrrp_instance instance_v6 {
|
|||
{{ address }} dev {{ dev }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% for addresses in keepalived__virtual_blackholes | ansible.utils.ipv6 %}
|
||||
blackhole {{ address }}
|
||||
{% endfor %}
|
||||
}
|
||||
{% if not (ipv4_enabled and ipv6_enabled) %}
|
||||
|
|
Loading…
Reference in a new issue