summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles')
-rw-r--r--deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
index 5e6520af..bf784bb3 100644
--- a/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
+++ b/deploy/adapters/ansible/roles/setup-network/files/setup_networks/setup_networks.py
@@ -56,6 +56,7 @@ def setup_ips(ip_settings, sys_intf_mappings):
cmd = "ip addr add %s/%s brd %s dev %s;" \
% (intf_info["ip"], intf_info["netmask"], str(network.broadcast),intf_name)
if "gw" in intf_info:
+ cmd += "route del default;"
cmd += "ip route add default via %s dev %s" % (intf_info["gw"], intf_name)
LOG.info("setup_ips: cmd=%s" % cmd)
os.system(cmd)