# Module Output Includes host and status...

**URL:** <https://forum.ansible.com/t/module-output-includes-host-and-status/19483>\
**Category:** Ansible Project\
**Created:** [October 11, 2015, 7:06pm UTC](https://forum.ansible.com/t/module-output-includes-host-and-status/19483 "2015-10-11T19:06:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Kettlewell](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Matthew\_Kettlewell](https://forum.ansible.com/u/Matthew_Kettlewell)\
**Post date:** [October 11, 2015, 7:06pm UTC](https://forum.ansible.com/t/module-output-includes-host-and-status/19483/1 "2015-10-11T19:06:19Z")

</div>

Is there a way to have the output of a module on the command line be a pure JSON object?

`

$ ansible localhost -m setup | head  
**localhost**  **| SUCCESS =\>** {  
“ansible\_facts”: {  
“ansible\_all\_ipv4\_addresses”: [  
…  
…

`

ie, removing the ‘localhost | SUCCESS =\>’ portion?

I’m sure can be done, since I’ve seen it referenced so often, but for the life of me, I can’t figure out what needs to change.

Thanks

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 23, 2015, 11:46pm UTC](https://forum.ansible.com/t/module-output-includes-host-and-status/19483/2 "2015-10-23T23:46:37Z")

</div>

you can filter it out with awk/sed or use a custom callback that does  
it directly.
