EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit cdfb8ef4 authored by Karl Grube's avatar Karl Grube
Browse files

fixed anycast script again

parent 78173774
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,10 @@ if [ "$1" = "up" ]; then
{% if interface.service|default(False) == True %}
{% if (anycast_ip|ansible.utils.ipv4) %}
ip a add {{anycast_ip}}/32 dev {{(interface|list)[0]}}
ip -4 rule add from {{anycast_ip}} lookup service priority 900
{% else %}
ip a add {{anycast_ip}}/128 dev {{(interface|list)[0]}}
ip -6 rule add from {{anycast_ip}} lookup service priority 900
{% endif %}
{% endif %}
{% endfor %}
......@@ -31,8 +33,10 @@ elif [ "$1" = "down" ]; then
{% if interface.service|default(False) == True %}
{% if (anycast_ip|ansible.utils.ipv4) %}
ip a del {{anycast_ip}}/32 dev {{(interface|list)[0]}}
ip -4 rule del from {{anycast_ip}} lookup service priority 900
{% else %}
ip a del {{anycast_ip}}/128 dev {{(interface|list)[0]}}
ip -6 rule del from {{anycast_ip}} lookup service priority 900
{% endif %}
{% endif %}
{% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment