New in version 2.0.
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
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/vmware_dvswitch_module.html