summaryrefslogtreecommitdiffstats
path: root/deploy/rename_nics.py
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/rename_nics.py')
-rw-r--r--deploy/rename_nics.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/deploy/rename_nics.py b/deploy/rename_nics.py
index a460e809..21651f68 100644
--- a/deploy/rename_nics.py
+++ b/deploy/rename_nics.py
@@ -17,16 +17,10 @@ def rename_nics(dha_info, rsa_file, compass_ip, os_version):
nic_name = interface.keys()[0]
mac = interface.values()[0]
- if os_version == 'xenial':
- exec_cmd("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
- -i %s root@%s \
- 'cobbler system edit --name=%s --interface=%s --mac=%s --interface_type=static'" # noqa
- % (rsa_file, compass_ip, host_name, nic_name, mac)) # noqa
- else:
- exec_cmd("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
- -i %s root@%s \
- 'cobbler system edit --name=%s --interface=%s --mac=%s'" # noqa
- % (rsa_file, compass_ip, host_name, nic_name, mac)) # noqa
+ exec_cmd("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
+ -i %s root@%s \
+ 'cobbler system edit --name=%s --interface=%s --mac=%s --static=1'" # noqa
+ % (rsa_file, compass_ip, host_name, nic_name, mac)) # noqa
exec_cmd("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
-i %s root@%s \