community.vmware.vmware_host_scanhba – Rescan host HBA’s and optionally refresh the storage system¶
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_scanhba
.
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 community.vmware.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
community.vmware.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
community.vmware.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
community.vmware.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:
Authors¶
Michael Eaton (@michaeldeaton)