--- # # For use: # ansible-inventory -i /root/ansible/inventories/vmware_vm_inventory.yml --list -y --output zzz.yml # cat zzz.yml | grep -i "guestid" | sed 's/^ config.guestId: //' | sed 's/$.*//' | sort | uniq # plugin: community.vmware.vmware_vm_inventory strict: true hostname: "vcs8srv01.lab.loc" username: "administrator@vsphere.local" password: "XXXXXXXXX" validate_certs: false with_tags: false with_folders: true #resources: # - datacenter: # - 'DC01' # resources: # - compute_resource: # - Cluster01 # - folder: # - VLAN-0222 hostnames: - config.name properties: - name - config.name - guest # - config.guestId - summary.runtime.powerState # - config.datastoreUrl - config.template filters: - config.template == false - summary.runtime.powerState == 'poweredOn' keyed_groups: - key: summary.runtime.powerState separator: '' # - key: ipConfig.network # separator: ''