# Ansible - generate reports

**URL:** <https://forum.ansible.com/t/ansible-generate-reports/25400>\
**Category:** Ansible Developer\
**Created:** [September 4, 2017, 9:32am UTC](https://forum.ansible.com/t/ansible-generate-reports/25400 "2017-09-04T09:32:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![belajzus](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@belajzus](https://forum.ansible.com/u/belajzus)\
**Post date:** [September 4, 2017, 9:32am UTC](https://forum.ansible.com/t/ansible-generate-reports/25400/1 "2017-09-04T09:32:12Z")

</div>

Hi to all,

I need some ideas about my problem, so if anybody has some ideas I would be very gratefull.

I want to generate some report on ansible server.  
My idea is to create custom facts which gather some information on some hosts.  
That information (facts) would be input for my html report about all hosts from where I gather facts.  
So, first task would be gather custom facts which I run on some group.  
My question is, how to use that collected facts to locally (on ansible server) populate some html template (jinja2).

Or more specifically, let say I have custom facts which generate following output.

“ansible\_local”: {  
getFacts: [  
{  
“var1”: “valueOne”,  
“var2”: “valueTwo”  
},  
{  
“valueDict”: {  
“dictVar1”: “dictValueOne”,  
“dictVar1”: “dictValueOne”

}  
}  
]  
}

So when I run setup module on multiple hosts, which result is previous facts, how to use all that facts to generate one report with all values.

host var1  
hostname1 valueOne  
hostname2 valueTwo  
hostname3 valueThree

Thanks in advance…

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [September 4, 2017, 1:09pm UTC](https://forum.ansible.com/t/ansible-generate-reports/25400/2 "2017-09-04T13:09:27Z")

</div>

This project takes collected facts and generates a single-page html report from them, so probably worth you having a look at (or just using):

[https://github.com/fboender/ansible-cmdb](https://github.com/fboender/ansible-cmdb)

Hope this helps,

Jon
