vmware_dvs_host – Add or remove a host from distributed virtual switch¶
Synopsis¶
Manage a host system from distributed virtual switch.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
PyVmomi
Parameters¶
Notes¶
Note
Tested on vSphere 5.5
Examples¶
- name: Add Host to dVS
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)
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
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]