community.vmware.vmware_dvs_host – Add or remove a host from distributed virtual switch¶
Note
This plugin is part of the community.vmware collection (version 1.9.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_dvs_host
.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
PyVmomi
Parameters¶
Examples¶
- name: Add Host to dVS
community.vmware.vmware_dvs_host:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
switch_name: dvSwitch
vmnics:
- vmnic0
- vmnic1
state: present
delegate_to: localhost
- name: Add Host to dVS/enable learnswitch (https://labs.vmware.com/flings/learnswitch)
community.vmware.vmware_dvs_host:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
switch_name: dvSwitch
vendor_specific_config:
- key: com.vmware.netoverlay.layer1
value: learnswitch
vmnics:
- vmnic0
- vmnic1
state: present
delegate_to: localhost
Authors¶
Joseph Callen (@jcpowermac)
Abhijeet Kasurde (@Akasurde)
Joseph Andreatta (@vmwjoseph)