# VmWare dynamic inventory - better facts

**URL:** <https://forum.ansible.com/t/vmware-dynamic-inventory-better-facts/17392>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [January 28, 2015, 9:13am UTC](https://forum.ansible.com/t/vmware-dynamic-inventory-better-facts/17392 "2015-01-28T09:13:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vaclav\_Adamec](https://avatars.discourse-cdn.com/v4/letter/v/a6a055/32.png) [@Vaclav\_Adamec](https://forum.ansible.com/u/Vaclav_Adamec)\
**Post date:** [January 28, 2015, 9:13am UTC](https://forum.ansible.com/t/vmware-dynamic-inventory-better-facts/17392/1 "2015-01-28T09:13:18Z")

</div>

Hi,  
actually gather facts are not very useful. Is it possible to also/instead include hosts facts which can we get via playbook and vsphere quest task? I think these informations will be useful for everyone

I’m not a programmer so creating/modifying actual python script is not an easy way for me 🙂 but it should be easy as it use same python vsphere API, so it’s only a question what should be get from vsphere and save in local cache.

I really appreciate any help/lead you can provide

Vasek

NOW (not sure who can use such info):

~/.cache/ansible/SERVERNAME

{“vmware\_disableSnapshotsSupported”: “False”, “vmware\_diskSharesSupported”: “True”, “vmware\_bootOptionsSupported”: “True”, “vmware\_settingVideoRamSizeSupported”: “True”, “vmware\_lockSnapshotsSupported”: “False”, “vmware\_recordReplaySupported”: “True”, “vmware\_snapshotConfigSupported”: “True”, “vmware\_multipleSnapshotsSupported”: “True”, “vmware\_settingScreenResolutionSupported”: “False”, “vmware\_settingDisplayTopologySupported”: “False”, “vmware\_poweredOffSnapshotsSupported”: “True”, “vmware\_toolsAutoUpdateSupported”: “True”, “vmware\_s1AcpiManagementSupported”: “True”, “vmware\_consolePreferencesSupported”: “False”, “vmware\_memorySnapshotsSupported”: “True”, “vmware\_npivWwnOnNonRdmVmSupported”: “True”, “vmware\_vmNpivWwnSupported”: “True”, “vmware\_name”: “SERVERNAME”, “vmware\_vmNpivWwnUpdateSupported”: “True”, “vmware\_swapPlacementSupported”: “True”, “vmware\_snapshotOperationsSupported”: “True”, “vmware\_vmNpivWwnDisableSupported”: “True”, “vmware\_toolsSyncTimeSupported”: “True”, “vmware\_cpuFeatureMaskSupported”: “True”, “vmware\_bootRetryOptionsSupported”: “True”, “vmware\_revertToSnapshotSupported”: “True”, “vmware\_quiescedSnapshotsSupported”: “True”, “vmware\_changeTrackingSupported”: “True”, “vmware\_virtualMmuUsageSupported”: “True”}

Better (get via vsphere quest task in playbook):

{“vmguest facts are {‘invocation’: {‘module\_name’: u’vsphere\_guest’, ‘module\_args’: ‘’}, u’changed’: False, u’ansible\_facts’: {u’hw\_name’: u’SERVERNAME’, u’hw\_processor\_count’: 4, u’hw\_memtotal\_mb’: 4096, u’module\_hw’: True, u’hw\_guest\_full\_name’: u’Red Hat Enterprise Linux 6 (64-bit)‘, u’hw\_guest\_id’: u’rhel6\_64Guest’, u’hw\_eth0’: {u’macaddress’: u’XXXXX’, u’label’: u’Network adapter 1’, u’addresstype’: u’assigned’, u’summary’: u’vlan\_XXXXX’, u’macaddress\_dash’: u’XXXXX’}, u’hw\_product\_uuid’: u’XXXXX’}}”

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 28, 2015, 1:45pm UTC](https://forum.ansible.com/t/vmware-dynamic-inventory-better-facts/17392/2 "2015-01-28T13:45:46Z")

</div>

it has been on my list for a while to get the guest module facts into  
the inventory plugin, also to make them use the same library to access  
the vmware api.
