diff options
Diffstat (limited to 'roles/vm/network/templates')
-rw-r--r-- | roles/vm/network/templates/interfaces.j2 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/roles/vm/network/templates/interfaces.j2 b/roles/vm/network/templates/interfaces.j2 index aa94440e..db0e322f 100644 --- a/roles/vm/network/templates/interfaces.j2 +++ b/roles/vm/network/templates/interfaces.j2 @@ -14,11 +14,11 @@ iface {{ network.primary.interface }} inet static pre-up echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf address {{ network.primary.ip }} netmask {{ network.primary.mask }} -{% if 'public' in network.primary %} - up /bin/ip addr add dev $IFACE {{ network.primary.public }}/32 - up /bin/ip route add default via {{ network.primary.gateway }} src {{ network.primary.public }} - down /bin/ip route del default via {{ network.primary.gateway }} src {{ network.primary.public }} - down /bin/ip addr del dev $IFACE {{ network.primary.public }}/32 +{% if 'overlay' in network.primary %} + up /bin/ip addr add dev $IFACE {{ network.primary.overlay }}/32 + up /bin/ip route add default via {{ network.primary.gateway }} src {{ network.primary.overlay }} + down /bin/ip route del default via {{ network.primary.gateway }} src {{ network.primary.overlay }} + down /bin/ip addr del dev $IFACE {{ network.primary.overlay }}/32 {% else %} gateway {{ network.primary.gateway }} {% endif %} |