# Why doesn't debug get me the output of these commands

**URL:** <https://forum.ansible.com/t/why-doesnt-debug-get-me-the-output-of-these-commands/31026>\
**Category:** Ansible Project\
**Created:** [August 12, 2019, 9:01pm UTC](https://forum.ansible.com/t/why-doesnt-debug-get-me-the-output-of-these-commands/31026 "2019-08-12T21:01:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pro\_Va](https://avatars.discourse-cdn.com/v4/letter/p/3be4f8/32.png) [@Pro\_Va](https://forum.ansible.com/u/Pro_Va)\
**Post date:** [August 12, 2019, 9:01pm UTC](https://forum.ansible.com/t/why-doesnt-debug-get-me-the-output-of-these-commands/31026/1 "2019-08-12T21:01:46Z")

</div>

Hello All ,

I am trying to run a playbook that gets me the status of Postfix instances running on an email relay server.

my playbook looks like this :

---

<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:** [August 13, 2019, 5:31am UTC](https://forum.ansible.com/t/why-doesnt-debug-get-me-the-output-of-these-commands/31026/2 "2019-08-13T05:31:14Z")

</div>

Which command did you run, and what output did you get from that (copied as text, not as images/attachments/screenshots)?

---

<div class="post-metadata">

**Author:** ![Pro\_Va](https://avatars.discourse-cdn.com/v4/letter/p/3be4f8/32.png) [@Pro\_Va](https://forum.ansible.com/u/Pro_Va)\
**Post date:** [August 13, 2019, 7:48am UTC](https://forum.ansible.com/t/why-doesnt-debug-get-me-the-output-of-these-commands/31026/3 "2019-08-13T07:48:05Z")

</div>

Thanks for your response , if i run this command on email relay server running postfix

" postmulti -i postfix-in-1 -p status " \>\> it gives me the following output \>\> " postfix-in-1/postfix-script: the Postfix mail system is running: PID: 8218 "

this tells me the instance is running , now i wanted my playbook to run the same command on the server and capture the output .

I basically wanted to run this playbook on a group of mail servers to check if postfix instance is running .

Ty.

---

<div class="post-metadata">

**Author:** ![Pro\_Va](https://avatars.discourse-cdn.com/v4/letter/p/3be4f8/32.png) [@Pro\_Va](https://forum.ansible.com/u/Pro_Va)\
**Post date:** [August 13, 2019, 7:52am UTC](https://forum.ansible.com/t/why-doesnt-debug-get-me-the-output-of-these-commands/31026/4 "2019-08-13T07:52:43Z")

</div>

My ansible playbook output is like this :

ok: [192.x.x.x] =\> {  
“msg”: “”  
}  
ok: [192.x.x.x] =\> {  
“msg”: “”  
}  
ok: [192.x.x.x] =\> {  
“msg”: “”  
}  
ok: [192.x.x.x] =\> {  
“msg”: “”  
}

so it tells me the command is executed but doesn’t capture the output of the command as stdout.

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [August 13, 2019, 8:20am UTC](https://forum.ansible.com/t/why-doesnt-debug-get-me-the-output-of-these-commands/31026/5 "2019-08-13T08:20:36Z")

</div>

> Thanks for your response , if i run this command on email relay server running postfix
> 
> " postmulti -i postfix-in-1 -p status " \>\> it gives me the following output \>\> " postfix-in-1/postfix-script: the  
> Postfix mail system is running: PID: 8218 "
> 
> this tells me the instance is running , now i wanted my playbook to run the same command on the server and capture the  
> output .
> 
> I basically wanted to run this playbook on a group of mail servers to check if postfix instance is running .
> 
> Ty.

For some reason postmulti's output is sent to stderr instead of stdout.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Pramod\_Thombare](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@Pramod\_Thombare](https://forum.ansible.com/u/Pramod_Thombare)\
**Post date:** [August 13, 2019, 5:29pm UTC](https://forum.ansible.com/t/why-doesnt-debug-get-me-the-output-of-these-commands/31026/6 "2019-08-13T17:29:28Z")

</div>

Remove changed\_when and run playbook …
