Documentation

vmware_dvswitch - Create or remove a distributed vSwitch

New in version 2.0.

Synopsis

  • Create or remove a distributed vSwitch

Options

parameter required default choices comments
datacenter_name
yes
The name of the datacenter that will contain the dvSwitch
discovery_operation
no
  • both
  • none
  • advertise
  • listen
Select the discovery operation
discovery_proto
yes
  • cdp
  • lldp
Link discovery protocol between Cisco and Link Layer discovery
hostname
yes
The hostname or IP address of the vSphere vCenter.
mtu
yes
The switch maximum transmission unit
password
yes
The password of the vSphere vCenter.

aliases: pass, pwd
state
no present
  • present
  • absent
Create or remove dvSwitch
switch_name
yes
The name of the switch to create or remove
uplink_quantity
yes
Quantity of uplink per ESXi host added to the switch
username
yes
The username of the vSphere vCenter.

aliases: user, admin
validate_certs
no True
  • True
  • False
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.

Examples

- name: Create dvswitch
  local_action:
    module: vmware_dvswitch
    hostname: vcenter_ip_or_hostname
    username: vcenter_username
    password: vcenter_password
    datacenter_name: datacenter
    switch_name: dvSwitch
    mtu: 9000
    uplink_quantity: 2
    discovery_proto: lldp
    discovery_operation: both
    state: present

Notes

Note

  • Tested on vSphere 5.5

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Support

This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.