community.vmware.vmware_cluster_info – Gather info about clusters 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_cluster_info
.
Synopsis¶
This module can be used to gather information about clusters in VMWare infrastructure.
All values and VMware object names are case sensitive.
This module was called
vmware_cluster_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 cluster info from given datacenter
community.vmware.vmware_cluster_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: ha-datacenter
delegate_to: localhost
register: cluster_info
- name: Gather info from datacenter about specific cluster
community.vmware.vmware_cluster_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: DC0_C0
delegate_to: localhost
register: cluster_info
- name: Gather info from datacenter about specific cluster with tags
community.vmware.vmware_cluster_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: DC0_C0
show_tag: True
delegate_to: localhost
register: cluster_info
- name: Gather some info from a cluster using the vSphere API output schema
vmware_cluster_info:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: DC0_C0
schema: vsphere
properties:
- name
- configuration.dasConfig.enabled
- summary.totalCpu
delegate_to: localhost
register: cluster_info
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Abhijeet Kasurde (@Akasurde)
Christian Neugum (@digifuchsi)