1- name: Attach a VM to a dvswitch 2 vmware.vmware_rest.vcenter_vm_hardware_ethernet: 3 vm: '{{ test_vm1_info.id }}' 4 pci_slot_number: 4 5 backing: 6 type: DISTRIBUTED_PORTGROUP 7 network: "{{ my_portgroup_info.dvs_portgroup_info.dvswitch1[0].key }}" 8 start_connected: false 9 register: vm_hardware_ethernet_1