diff --git a/changelogs/fragments/65997-vmware_guest-exclude-dvswitch-name-from-os-customization.yml b/changelogs/fragments/65997-vmware_guest-exclude-dvswitch-name-from-os-customization.yml new file mode 100644 index 00000000000..f1260d20ae9 --- /dev/null +++ b/changelogs/fragments/65997-vmware_guest-exclude-dvswitch-name-from-os-customization.yml @@ -0,0 +1,2 @@ +bugfixes: + - vmware_guest - Exclude dvswitch_name from triggering guest os customization. diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py index d4c2cb0abf4..5f2d0d82ef4 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py @@ -2432,7 +2432,7 @@ class PyVmomiHelper(PyVmomi): if key == 'type' and nw['type'] == 'dhcp': network_changes = True break - if key not in ('device_type', 'mac', 'name', 'vlan', 'type', 'start_connected'): + if key not in ('device_type', 'mac', 'name', 'vlan', 'type', 'start_connected', 'dvswitch_name'): network_changes = True break @@ -2701,7 +2701,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', 'type', 'start_connected'): + if key not in ('device_type', 'mac', 'name', 'vlan', 'type', 'start_connected', 'dvswitch_name'): network_changes = True break if len(self.params['customization']) > 1 or network_changes or self.params.get('customization_spec'):