From d4bef8652a85b757a963c0b4caf36a20d100513b Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Mon, 10 Sep 2018 15:37:15 +0530 Subject: [PATCH] VMware: skip customization if no type is specified (#44510) VM customization is not necessary if user is not specifying IP address and netmask. This fix adds exception for type 'DHCP' which is set by default if no networking details are provided. Signed-off-by: Abhijeet Kasurde --- lib/ansible/modules/cloud/vmware/vmware_guest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py index 0bb4620e6c..d4378d6bcc 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py @@ -2015,7 +2015,7 @@ class PyVmomiHelper(PyVmomi): for nw in self.params['networks']: for key in nw: # We don't need customizations for these keys - if key not in ('device_type', 'mac', 'name', 'vlan'): + if key not in ('device_type', 'mac', 'name', 'vlan', 'type'): network_changes = True break