vmware_host_scanhba – Rescan host HBA’s and optionally refresh the storage system¶
New in version 2.8.
Synopsis¶
This module can force a rescan of the hosts HBA subsystem which is needed when wanting to mount a new datastore.
You could use this before using vmware_host_datastore to mount a new datastore to ensure your device/volume is ready.
You can also optionally force a Refresh of the Storage System in vCenter/ESXi Web Client.
All parameters and VMware object names are case sensitive.
You can supply an esxi_hostname or a cluster_name
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Examples¶
- name: Recan HBA's for a given ESXi host and refresh storage system objects
vmware_host_scanhba:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ inventory_hostname }}'
refresh_storage: true
delegate_to: localhost
- name: Rescan HBA's for a given cluster - all found hosts will be scanned
vmware_host_scanhba:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ inventory_hostname }}'
refresh_storage: true
delegate_to: localhost
- name: Recan HBA's for a given ESXi host and don't refresh storage system objects
vmware_host_scanhba:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ inventory_hostname }}'
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¶
Michael Eaton (@michaeldeaton)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.