diff --git a/roles/ifstated/templates/ifstated.conf.j2 b/roles/ifstated/templates/ifstated.conf.j2 index b3e4b42..da40910 100644 --- a/roles/ifstated/templates/ifstated.conf.j2 +++ b/roles/ifstated/templates/ifstated.conf.j2 @@ -1,4 +1,4 @@ - -# flush routes when external carp goes up -if carp*.link.up +{% for int in network_vip_interfaces %} +if carp{{ int.vhid }}.link.up run 'route -q flush ; route add default $(cat /etc/mygate)' +{% endfor %}