community.vmware.vmware_datastore_info – Gather info about datastores available in given vCenter¶
Note
This plugin is part of the community.vmware collection (version 1.7.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_datastore_info
.
Synopsis¶
This module can be used to gather information about datastores in VMWare infrastructure.
All values and VMware object names are case sensitive.
This module was called
vmware_datastore_facts
before Ansible 2.9. The usage did not change.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Examples¶
- name: Gather info from standalone ESXi server having datacenter as 'ha-datacenter'
community.vmware.vmware_datastore_info:
hostname: '{{ esxi_hostname }}'
username: '{{ esxi_username }}'
password: '{{ esxi_password }}'
datacenter_name: "ha-datacenter"
delegate_to: localhost
register: info
- name: Gather info from datacenter about specific datastore
community.vmware.vmware_datastore_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
name: datastore1
delegate_to: localhost
register: info
- name: Gather some info from a datastore using the vSphere API output schema
community.vmware.vmware_datastore_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter_name: '{{ datacenter_name }}'
schema: vsphere
properties:
- name
- info.vmfs.ssd
- capability.vsanSparseSupported
- overallStatus
delegate_to: localhost
register: info
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Tim Rightnour (@garbled1)