community.vmware.vmware_host_lockdown – Manage administrator permission for the local administrative account for the ESXi host¶
Note
This plugin is part of the community.vmware collection (version 1.9.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_host_lockdown
.
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
community.vmware.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
community.vmware.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
community.vmware.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
community.vmware.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
community.vmware.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:
Authors¶
Abhijeet Kasurde (@Akasurde)