vmware_host_lockdown – Manage administrator permission for the local administrative account for the ESXi host¶
New in version 2.5.
Synopsis¶
- This module can be used to manage administrator permission for the local administrative account for the host when ESXi hostname is given.
- All parameters and VMware objects values are case sensitive.
- This module is destructive as administrator permission are managed using APIs used, please read options carefully and proceed.
- Please specify
hostname
as vCenter IP or hostname only, as lockdown operations are not possible from standalone ESXi server.
Requirements¶
The below requirements are needed on the host that executes this module.
- python >= 2.6
- PyVmomi
Parameters¶
Examples¶
- name: Enter host system into lockdown mode
vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: present
delegate_to: localhost
- name: Exit host systems from lockdown mode
vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
state: absent
delegate_to: localhost
- name: Enter host systems into lockdown mode
vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname:
- '{{ esxi_hostname_1 }}'
- '{{ esxi_hostname_2 }}'
state: present
delegate_to: localhost
- name: Exit host systems from lockdown mode
vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname:
- '{{ esxi_hostname_1 }}'
- '{{ esxi_hostname_2 }}'
state: absent
delegate_to: localhost
- name: Enter all host system from cluster into lockdown mode
vmware_host_lockdown:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
state: present
delegate_to: localhost
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Abhijeet Kasurde (@Akasurde)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.