New in version 2.0.
- python >= 2.7
- PyVmomi
parameter | required | default | choices | comments |
---|---|---|---|---|
esxi_hostname |
yes |
The ESXi hostname
|
||
hostname |
yes |
The hostname or IP address of the vSphere vCenter.
|
||
password |
yes |
The password of the vSphere vCenter.
aliases: pass, pwd
|
||
state |
yes |
|
If the host should be present or absent attached to the vSwitch
|
|
switch_name |
yes |
The name of the Distributed vSwitch
|
||
username |
yes |
The username of the vSphere vCenter.
aliases: user, admin
|
||
validate_certs |
no | True |
|
Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted.
|
vmnics |
yes |
The ESXi hosts vmnics to use with the Distributed vSwitch
|
# Example vmware_dvs_host command from Ansible Playbooks - name: Add Host to dVS local_action: module: vmware_dvs_host hostname: vcenter_ip_or_hostname username: vcenter_username password: vcenter_password esxi_hostname: esxi_hostname_as_listed_in_vcenter switch_name: dvSwitch vmnics: - vmnic0 - vmnic1 state: present
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.