New in version 2.0.
Create or remove a distributed vSwitch
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| datacenter_name | yes | The name of the datacenter that will contain the dvSwitch |
||
| discovery_operation | no |
| Select the discovery operation |
|
| discovery_proto | yes |
| 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 |
| 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 |
| Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted. |
- 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
Note
Tested on vSphere 5.5
For more information on what this means please read Extras Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.
© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/vmware_dvswitch_module.html