The vmware_host_vmnic_facts module

From an old-style fact module back to a new one, this module can be used to gather information on the physical network interfaces on your VMware ESXi hosts:

- name: Find out facts about the vmnics on all the ESXi hosts  vmware_host_vmnic_facts:    hostname: "{{ vsphere_host }}"    username: "{{ vsphere_username }}"    password: "{{ vsphere_password }}"    validate_certs: "no"    datacenter: "my_datacenter"  register: cluster_vmnics

For a single ESXi host, we could use the following task:

- name: Find out facts about the vmnics on a single ESXi host  vmware_host_vmnic_facts:    hostname: "{{ vsphere_host }}"    username: "{{ vsphere_username }}"    password: "{{ vsphere_password }}"    validate_certs: "no" esxi_hostname: "{{ exsi_host ...

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.