Parameter |
Choices/Defaults |
Comments |
contact
dictionary
|
|
Dictionary which configures administrator contact name and description for the Distributed Switch.
|
|
description
string
|
|
Description or other details.
|
|
name
string
|
|
Administrator name.
|
datacenter_name
string
|
|
The name of the datacenter that will contain the Distributed Switch.
This parameter is optional, if folder is provided.
Mutually exclusive with folder parameter.
aliases: datacenter
|
description
string
|
|
Description of the Distributed Switch.
|
discovery_operation
string
|
Choices:
- both
- advertise
listen ←
|
Select the discovery operation.
Required parameter for state both present and absent , before Ansible 2.6 version.
Required only if state is set to present , for Ansible 2.6 and onwards.
|
discovery_proto
string
|
Choices:
cdp ←
- lldp
- disabled
|
Link discovery protocol between Cisco and Link Layer discovery.
Required parameter for state both present and absent , before Ansible 2.6 version.
Required only if state is set to present , for Ansible 2.6 and onwards.
cdp : Use Cisco Discovery Protocol (CDP).
lldp : Use Link Layer Discovery Protocol (LLDP).
disabled : Do not use a discovery protocol.
aliases: discovery_protocol
|
folder
string
|
|
Destination folder, absolute path to place dvswitch in.
The folder should include the datacenter.
This parameter is case sensitive.
This parameter is optional, if datacenter is provided.
Examples:
folder: /datacenter1/network
folder: datacenter1/network
folder: /datacenter1/network/folder1
folder: datacenter1/network/folder1
folder: /folder1/datacenter1/network
folder: folder1/datacenter1/network
folder: /folder1/datacenter1/network/folder2
|
health_check
dictionary
|
Default:
{"teaming_failover": false, "teaming_failover_interval": 0, "vlan_mtu": false, "vlan_mtu_interval": 0}
|
Dictionary which configures Health Check for the Distributed Switch.
|
|
teaming_failover
boolean
|
|
Teaming and failover health check.
|
|
teaming_failover_interval
integer
|
Default:
0
|
Teaming and failover health check interval (minutes).
The default value is 1 in the vSphere Client if the Teaming and failover health check is enabled.
|
|
vlan_mtu
boolean
|
|
VLAN and MTU health check.
|
|
vlan_mtu_interval
integer
|
Default:
0
|
VLAN and MTU health check interval (minutes).
The default value is 1 in the vSphere Client if the VLAN and MTU health check is enabled.
|
hostname
string
|
|
The hostname or IP address of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.
Environment variable support added in Ansible 2.6.
|
mtu
integer
|
Default:
1500
|
The switch maximum transmission unit.
Required parameter for state both present and absent , before Ansible 2.6 version.
Required only if state is set to present , for Ansible 2.6 and onwards.
Accepts value between 1280 to 9000 (both inclusive).
|
multicast_filtering_mode
string
|
Choices:
basic ←
- snooping
|
The multicast filtering mode.
basic mode: multicast traffic for virtual machines is forwarded according to the destination MAC address of the multicast group.
snooping mode: the Distributed Switch provides IGMP and MLD snooping according to RFC 4541.
|
net_flow
dictionary
added in 2.7.0
|
Default:
{"active_flow_timeout": 60, "collector_port": 0, "idle_flow_timeout": 15, "internal_flows_only": false, "observation_domain_id": 0, "sampling_rate": 4096}
|
Dictionary which configures the Net Flow for the Distributed Switch.
|
|
active_flow_timeout
integer
|
Default:
60
|
The time, in seconds, to wait before sending information after the flow is initiated.
|
|
collector_ip
string
|
|
The IP Address (IPv4 or IPv6) of the NetFlow collector.
|
|
collector_port
integer
|
Default:
0
|
The Port of the NetFlow collector.
|
|
idle_flow_timeout
integer
|
Default:
15
|
The time, in seconds, to wait before sending information after the flow is initiated.
|
|
internal_flows_only
boolean
|
|
If True, data on network activity between vms on the same host will be collected only.
|
|
observation_domain_id
integer
|
Default:
0
|
Identifies the information related to the switch.
|
|
sampling_rate
integer
|
Default:
4096
|
The portion of data that the switch collects.
The sampling rate represents the number of packets that NetFlow drops after every collected packet.
If the rate is 0, NetFlow samples every packet, that is, collect one packet and drop none.
If the rate is 1, NetFlow samples a packet and drops the next one, and so on.
|
network_policy
dictionary
|
|
Dictionary which configures the different default security values for portgroups.
If set, these options are inherited by the portgroups of the DVS.
|
|
forged_transmits
boolean
|
|
Indicates whether forged transmits are allowed.
|
|
mac_changes
boolean
|
|
Indicates whether mac changes are allowed.
|
|
promiscuous
boolean
|
|
Indicates whether promiscuous mode is allowed.
|
password
string
|
|
The password of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.
Environment variable support added in Ansible 2.6.
aliases: pass, pwd
|
port
integer
|
Default:
443
|
The port number of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.
Environment variable support added in Ansible 2.6.
|
proxy_host
string
|
|
Address of a proxy that will receive all HTTPS requests and relay them.
The format is a hostname or a IP.
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_HOST will be used instead.
This feature depends on a version of pyvmomi greater than v6.7.1.2018.12
|
proxy_port
integer
|
|
Port of the HTTP proxy that will receive all HTTPS requests and relay them.
If the value is not specified in the task, the value of environment variable VMWARE_PROXY_PORT will be used instead.
|
state
string
|
Choices:
present ←
- absent
|
If set to present and the Distributed Switch does not exist, the Distributed Switch will be created.
If set to absent and the Distributed Switch exists, the Distributed Switch will be deleted.
|
switch_name
string
/ required
|
|
The name of the distribute vSwitch to create or remove.
aliases: switch, dvswitch
|
switch_version
string
|
|
The version of the Distributed Switch to create.
The version must match the version of the ESXi hosts you want to connect.
The version of the vCenter server is used if not specified.
Required only if state is set to present .
aliases: version
|
uplink_prefix
string
|
Default:
"Uplink "
|
The prefix used for the naming of the uplinks.
Only valid if the Distributed Switch will be created. Not used if the Distributed Switch is already present.
Uplinks are created as Uplink 1, Uplink 2, etc. pp. by default.
|
uplink_quantity
integer
|
|
Quantity of uplink per ESXi host added to the Distributed Switch.
The uplink quantity can be increased or decreased, but a decrease will only be successfull if the uplink isn't used by a portgroup.
Required parameter for state both present and absent , before Ansible 2.6 version.
Required only if state is set to present , for Ansible 2.6 and onwards.
|
username
string
|
|
The username of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.
Environment variable support added in Ansible 2.6.
aliases: admin, user
|
validate_certs
boolean
|
|
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.
Environment variable support added in Ansible 2.6.
If set to true , please make sure Python >= 2.7.9 is installed on the given machine.
|