From 34ecd6cb25258116d394ffcbaf9ec29504a3919a Mon Sep 17 00:00:00 2001 From: ngp-star <55133371+ngp-star@users.noreply.github.com> Date: Thu, 28 Nov 2019 16:43:46 +0530 Subject: [PATCH] VMware: Update hostname when VM is cloned (#65037) Fixes: #57873 --- lib/ansible/modules/cloud/vmware/vmware_guest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py index 80aa6199031..b82fb7bd0de 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py @@ -2410,6 +2410,9 @@ class PyVmomiHelper(PyVmomi): for nw in self.params['networks']: for key in nw: # We don't need customizations for these keys + if key == 'type' and nw['type'] == 'dhcp': + network_changes = True + break if key not in ('device_type', 'mac', 'name', 'vlan', 'type', 'start_connected'): network_changes = True break