Inventory gathering including docker version

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.

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).

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

Cheers,
Felix

Thank you, Felix, will explore.