# Ansible to display system inventory information

**URL:** <https://forum.ansible.com/t/ansible-to-display-system-inventory-information/20781>\
**Category:** Ansible Project\
**Created:** [March 5, 2016, 1:39am UTC](https://forum.ansible.com/t/ansible-to-display-system-inventory-information/20781 "2016-03-05T01:39:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hongjun\_Ma](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@Hongjun\_Ma](https://forum.ansible.com/u/Hongjun_Ma)\
**Post date:** [March 5, 2016, 1:39am UTC](https://forum.ansible.com/t/ansible-to-display-system-inventory-information/20781/1 "2016-03-05T01:39:06Z")

</div>

I have python module collect single system inventory info using print statement and I’d like to use Ansible to collect the same information against all inventory hosts.

I know Ansible doesn’t like custom module to do print and I can return some JSON fields using module.exit\_json call. I can register the var and debug var[‘field’] in Ansible. Is this the right and only way to parse the python output on the console? How about I have multiple instances of prints in Python module and I don’t want to exit back to ansible to get things printed out.

My python call is on localhost BTW.
