# fetch stdout in ansible 2.0

**URL:** <https://forum.ansible.com/t/fetch-stdout-in-ansible-2-0/21622>\
**Category:** Ansible Developer\
**Created:** [June 1, 2016, 1:16am UTC](https://forum.ansible.com/t/fetch-stdout-in-ansible-2-0/21622 "2016-06-01T01:16:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Huan\_He](https://avatars.discourse-cdn.com/v4/letter/h/13edae/32.png) [@Huan\_He](https://forum.ansible.com/u/Huan_He)\
**Post date:** [June 1, 2016, 1:16am UTC](https://forum.ansible.com/t/fetch-stdout-in-ansible-2-0/21622/1 "2016-06-01T01:16:52Z")

</div>

in ansible 1.x, we can do

results = runner.run()

to retrieve stdout. See [https://github.com/networktocode/ntc-ansible/issues/108](https://github.com/networktocode/ntc-ansible/issues/108), I wonder it is possible in ansible 2.0 to do similar thing?

I understand that it can be done by implementing a callback plugin to write the stdout to a file then read from the file.

Thanks,  
Huan
