The vmware_dvswitch module

This module allows you to create and remove distributed vSwitches:

- name: Create dvswitch  vmware_dvswitch:    hostname: "{{ vsphere_host }}"    username: "{{ vsphere_username }}"    password: "{{ vsphere_password }}"    validate_certs: "no"    datacenter: "my_datacenter"    switch_name: "my_dvSwitch"    switch_version: "6.0.0"    mtu: "9000"    uplink_quantity: "2"    discovery_proto: "lldp"    discovery_operation: "both"    state: present  delegate_to: "localhost"

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.