# Inventory gathering including docker version

**URL:** <https://forum.ansible.com/t/inventory-gathering-including-docker-version/32439>\
**Category:** Ansible Project\
**Created:** [March 11, 2020, 2:13am UTC](https://forum.ansible.com/t/inventory-gathering-including-docker-version/32439 "2020-03-11T02:13:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kuber\_User](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@Kuber\_User](https://forum.ansible.com/u/Kuber_User)\
**Post date:** [March 11, 2020, 2:13am UTC](https://forum.ansible.com/t/inventory-gathering-including-docker-version/32439/1 "2020-03-11T02:13:27Z")

</div>

HI,  
I am doing a similar script to gather inventory of remote systems.  
I have the input list in my inventory file as the list of remote IPs.  
I need to extract the fields like CPU, RAM, Kernel version, and the docker version running on those boxes.  
I am currently using the following cmd to extract what I need, only to html format

1. ansible -i my\_inv\_file -m setup --tree out/ all
2. ansible-cmdb --exclude-cols=dtap,comment,ext\_id,fqdn,all\_ipv4,all\_ipv6,os,arch,virt,mem\_usage,swap\_usage,disk\_usage,physdisk\_size,nr\_of\_ifaces,prodname,prodserial -t html\_fancy\_split -p local\_js=1 out/

This is getting me the cols I need. I also need sensible version.

To this end, I tried to add an additional option “-C examples/cust-cols.conf” to the above command. And was able to get some dummy columns added to test, but I need to have docker\_version field.  
Can you please help me.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [March 11, 2020, 10:03am UTC](https://forum.ansible.com/t/inventory-gathering-including-docker-version/32439/2 "2020-03-11T10:03:37Z")

</div>

Hi,

you should be able to use the docker\_host\_info module to find out the  
dcker daemon version. Check out its host\_info return value  
([https://docs.ansible.com/ansible/latest/modules/docker\_host\_info\_module.html#return-host\_info](https://docs.ansible.com/ansible/latest/modules/docker_host_info_module.html#return-host_info)).

How you can integrate that into your output, that's another story...

Cheers,  
Felix

---

<div class="post-metadata">

**Author:** ![Kuber\_User](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@Kuber\_User](https://forum.ansible.com/u/Kuber_User)\
**Post date:** [March 12, 2020, 9:11am UTC](https://forum.ansible.com/t/inventory-gathering-including-docker-version/32439/3 "2020-03-12T09:11:36Z")

</div>

Thank you, Felix, will explore.
