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 : ) .