Using this module, you can add or remove a VMware Standard Switch (vSwitch) to an ESXi host:
- name: Add a vSwitch vmware_vswitch: hostname: "{{ vsphere_host }}" username: "{{ vsphere_username }}" password: "{{ vsphere_password }}" validate_certs: "no" switch: "vswitch_name" nics: - "vmnic1" - "vmnic2" mtu: "9000" delegate_to: "localhost"
In this example, we have added a vSwitch that's attached to multiple vmnics.