New in version 2.0.
Add or remove a host from distributed virtual switch
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
Tested on vSphere 5.5
For more information on what this means please read Extras Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.
© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/vmware_dvs_host_module.html