# stdout return 2 values

**URL:** <https://forum.ansible.com/t/stdout-return-2-values/36512>\
**Category:** Ansible Project\
**Created:** [April 5, 2022, 4:56pm UTC](https://forum.ansible.com/t/stdout-return-2-values/36512 "2022-04-05T16:56:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shco](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@shco](https://forum.ansible.com/u/shco)\
**Post date:** [April 5, 2022, 4:56pm UTC](https://forum.ansible.com/t/stdout-return-2-values/36512/1 "2022-04-05T16:56:45Z")

</div>

Hi

I try to get PID using Ansible.  
I try run the following lines but instead to get one value (PID) I get 2 values , 1 - PID and 2 - PID of Ansible process that running remotely.

I get: “pid.stdout”: “2229\n2456601”  
that actually 2229 value I need to store as pid.

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [April 6, 2022, 4:57am UTC](https://forum.ansible.com/t/stdout-return-2-values/36512/2 "2022-04-06T04:57:56Z")

</div>

What are you actually trying to achieve?  
Because from your shell task it seems you intend to do things that could be better done in other ways
