New in version 2.1.
| 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 |
|---|---|---|---|---|
| status | Action taken | always | 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
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.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/vmware_maintenancemode_module.html