community / community.vmware / 4.2.0 / module / vmware_dvswitch_uplink_pg Manage uplink portgroup configuration of a Distributed Switch Authors: Christian Kotte (@ckotte)community.vmware.vmware_dvswitch_uplink_pg (4.2.0) — module
Install with ansible-galaxy collection install community.vmware:==4.2.0
collections: - name: community.vmware version: 4.2.0
This module can be used to configure the uplink portgroup of a Distributed Switch.
- name: Configure Uplink portgroup community.vmware.vmware_dvswitch_uplink_pg: hostname: '{{ inventory_hostname }}' username: '{{ vcsa_username }}' password: '{{ vcsa_password }}' switch: dvSwitch name: dvSwitch-DVUplinks advanced: port_config_reset_at_disconnect: true block_override: true vendor_config_override: false vlan_override: false netflow_override: false traffic_filter_override: false vlan_trunk_range: - '0-4094' netflow_enabled: false block_all_ports: false delegate_to: localhost
- name: Enabled LACP on Uplink portgroup community.vmware.vmware_dvswitch_uplink_pg: hostname: '{{ inventory_hostname }}' username: '{{ vcsa_username }}' password: '{{ vcsa_password }}' switch: dvSwitch lacp: status: enabled mode: active delegate_to: localhost
lacp: default: mode: passive status: disabled description: - Dictionary which configures the LACP settings for the uplink portgroup. - The options are only used if the LACP support mode is set to 'basic'. required: false suboptions: mode: choices: - active - passive default: passive description: The negotiating state of the uplinks/ports. type: str status: choices: - enabled - disabled default: disabled description: Indicates if LACP is enabled. type: str type: dict name: description: - The name of the uplink portgroup. - The current name will be used if not specified. type: str port: default: 443 description: - The port number of the vSphere vCenter or ESXi server. - If the value is not specified in the task, the value of environment variable E(VMWARE_PORT) will be used instead. type: int switch: aliases: - dvswitch description: - The name of the Distributed Switch. required: true type: str advanced: aliases: - port_policy default: block_override: true netflow_override: false port_config_reset_at_disconnect: true traffic_filter_override: false vendor_config_override: false vlan_override: false description: - Dictionary which configures the advanced policy settings for the uplink portgroup. required: false suboptions: block_override: default: true description: - Indicates if the block policy can be changed per port. type: bool netflow_override: default: false description: - Indicates if the NetFlow policy can be changed per port. type: bool port_config_reset_at_disconnect: default: true description: - Indicates if the configuration of a port is reset automatically after disconnect. type: bool traffic_filter_override: default: false description: - Indicates if the traffic filter can be changed per port. type: bool vendor_config_override: default: false description: - Indicates if the vendor config can be changed per port. type: bool vlan_override: default: false description: - Indicates if the vlan can be changed per port. type: bool type: dict hostname: description: - 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 E(VMWARE_HOST) will be used instead. type: str password: aliases: - pass - pwd description: - The password of the vSphere vCenter or ESXi server. - If the value is not specified in the task, the value of environment variable E(VMWARE_PASSWORD) will be used instead. type: str username: aliases: - admin - user description: - The username of the vSphere vCenter or ESXi server. - If the value is not specified in the task, the value of environment variable E(VMWARE_USER) will be used instead. type: str proxy_host: description: - 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 E(VMWARE_PROXY_HOST) will be used instead. required: false type: str proxy_port: description: - 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 E(VMWARE_PROXY_PORT) will be used instead. required: false type: int description: description: - The description of the uplink portgroup. type: str validate_certs: default: true description: - Allows connection when SSL certificates are not valid. Set to V(false) when certificates are not trusted. - If the value is not specified in the task, the value of environment variable E(VMWARE_VALIDATE_CERTS) will be used instead. type: bool block_all_ports: default: false description: - Indicates if all ports are blocked on the uplink portgroup. type: bool netflow_enabled: default: false description: - Indicates if NetFlow is enabled on the uplink portgroup. type: bool vlan_trunk_range: default: - 0-4094 description: - The VLAN trunk range that should be configured with the uplink portgroup. - 'This can be a combination of multiple ranges and numbers, example: [ 2-3967, 4049-4092 ].' elements: str type: list
result: description: information about performed operation returned: always sample: adv_block_ports: true adv_netflow: false adv_reset_at_disconnect: true adv_traffic_filtering: false adv_vendor_conf: false adv_vlan: false block_all_ports: false changed: false description: null dvswitch: dvSwitch lacp_status: disabled lacp_status_previous: enabled name: dvSwitch-DVUplinks netflow_enabled: false result: Uplink portgroup already configured properly vlan_trunk_range: - 2-3967 - 4049-4092 type: str