I’m wondering if anyone has any existing playbooks and/or scripts to go through an environment and document the findings.
Basically a way to transform the results from the setup module into a useful CSV would be a good start, but also adding on other facets like lists of patches to be applied, etc would be very useful.
I’ve made use of the setup module to create a directory of hosts files showing the results in YAML, but transforming that into a useful report would take some work and I figure someone out there may have already done it.
I’ve done something like this to create an inventory tracking spreadsheet. Haven’t had the chance yet to improve it or convert it into a proper playbook.
The setup module allows you to output facts to a tree structure with a JSON file for each host:
Thank you so much for your replies. I tried ansible-cmdb earlier. -t txt_table or -t csv is giving limited columns.
I’m having difficulty in customizing fact columns that show up, should I edit /usr/lib/ansible-cmdb/ansiblecmdb/data/tpl/csv.tpl or txt_table.tpl for customizing?
Sorry not much in to jinja2 templating, but I"ll look at it. Any hints / suggestions will be helpful on how to customize.