Manage LACP configuration on a Distributed Switch
- This module can be used to configure Link Aggregation Control Protocol (LACP) support mode and Link Aggregation Groups (LAGs).
Note
- You need to run the task two times if you want to remove all LAGs and change the support mode to 'basic'
- All modules requires API write access and hence is not supported on a free ESXi license.
- name: Enable enhanced mode on a Distributed Switch
community.vmware.vmware_dvswitch_lacp:
hostname: '{{ inventory_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
switch: dvSwitch
support_mode: enhanced
validate_certs: "{{ validate_vcenter_certs }}"
delegate_to: localhost
loop_control:
label: "{{ item.name }}"
with_items: "{{ vcenter_distributed_switches }}"
- name: Enable enhanced mode and create two LAGs on a Distributed Switch
community.vmware.vmware_dvswitch_lacp:
hostname: '{{ inventory_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
switch: dvSwitch
support_mode: enhanced
link_aggregation_groups:
- name: lag1
uplink_number: 2
mode: active
load_balancing_mode: srcDestIpTcpUdpPortVlan
- name: lag2
uplink_number: 2
mode: passive
load_balancing_mode: srcDestIp
validate_certs: "{{ validate_vcenter_certs }}"
delegate_to: localhost
loop_control:
label: "{{ item.name }}"
with_items: "{{ vcenter_distributed_switches }}"
Common return values are documented here, the following are the fields unique to this module:
- Christian Kotte (@ckotte)