The vmware_host_package_facts module

This module can be used to gather facts on all of the VMware ESXi hosts within your cluster:

- name: Find out facts about the packages on all the ESXi hosts  vmware_host_package_facts:    hostname: "{{ vsphere_host }}"    username: "{{ vsphere_username }}"    password: "{{ vsphere_password }}"    validate_certs: "no"    cluster_name: "my_cluster"  register: cluster_packages

Like the rest of the facts modules, it can also gather for just a single host:

- name: Find out facts about the packages on a single ESXi host  vmware_host_package_facts:    hostname: "{{ vsphere_host }}"    username: "{{ vsphere_username }}"    password: "{{ vsphere_password }}"    validate_certs: "no"    esxi_hostname: "{{ exsi_host }}"  register: host_packages

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.