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. On Tuesday, August 13, 2019 at 11:01:43 AM UTC+5:30, Dick Visser wrote: > > > > Which command did you run, and what output did you get from that (copied > as text, not as images/attachments/screenshots)? > > > > On Mon, 12 Aug 2019 at 23:01, Pro Va <[email protected] <javascript:>> > wrote: > >> 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 : >> >> >> >> ****************************************************************************** >> >> - name: checking status of Inbound Instance >> command: postmulti -i postfix-in-1 -p status >> register: result >> ignore_errors: yes >> changed_when: False >> become: yes >> >> - name: showing in-1 status >> debug: >> var: result.stdout >> >> >> - name: checking status of Outbound Instance >> shell: /usr/sbin/postmulti -i postfix-out-1 -p status >> register: result2 >> become: yes >> changed_when: False >> - debug: msg="{{ result2.stdout }}" >> >> >> >> ******************************************************************************* >> >> i am expecting an output like this , which normally gets written to >> screen when run on the server : >> >> postfix-in-1/postfix-script: the Postfix mail system is running: PID: 8218 >> postfix-out-1/postfix-script: the Postfix mail system is running: PID: >> 7321 >> >> but ansible playbook has a null stdout or stdout_lines . >> >> any suggestions appreciated : ) . >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/81645deb-3708-4025-b226-d4296f4ad63f%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/81645deb-3708-4025-b226-d4296f4ad63f%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > Sent from a mobile device - please excuse the brevity, spelling and > punctuation. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e2c8e960-4b16-4d02-8c9b-01c7370207da%40googlegroups.com.
