New in version 2.1.
Place an ESXI host into maintenance mode Support for VSAN compliant maintenance mode when selected
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 Common Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
status | Action taken | string | ENTER | |
hostsystem | Name of vim reference | always | string | 'vim.HostSystem:host-236' |
hostname | Name of host in vCenter | always | string | esxi.local.domain |
Note
Tested on vSphere 5.5 and 6.0
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_maintenancemode_module.html