New in version 2.1.
- python >= 2.6
- PyVmomi
parameter | required | default | choices | comments |
---|---|---|---|---|
esxi_hostname |
yes |
Name of the host as defined in vCenter
|
||
evacuate |
no |
|
If True, evacuate all powered off VMs
|
|
hostname |
yes |
The hostname or IP address of the vSphere vCenter.
|
||
password |
yes |
The password of the vSphere vCenter.
aliases: pass, pwd
|
||
state |
no | present |
|
Enter or exit maintenance mode
|
timeout |
no |
Specify a timeout for the operation
|
||
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.
|
vsan_mode |
no |
|
Specify which VSAN compliant mode to enter
|
- name: Enter VSAN-Compliant Maintenance Mode local_action: module: vmware_maintenancemode hostname: vc_host username: vc_user password: vc_pass esxi_hostname: esxi.host.example vsan: ensureObjectAccessibility evacuate: yes timeout: 3600 state: present
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
hostname |
Name of host in vCenter
|
always | string | esxi.local.domain |
hostsystem |
Name of vim reference
|
always | string | 'vim.HostSystem:host-236' |
status |
Action taken
|
always | string | ENTER |
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.