# view remote shell script output to the controller node terminal screen

**URL:** <https://forum.ansible.com/t/view-remote-shell-script-output-to-the-controller-node-terminal-screen/28499>\
**Category:** Ansible Project\
**Created:** [September 4, 2018, 10:14pm UTC](https://forum.ansible.com/t/view-remote-shell-script-output-to-the-controller-node-terminal-screen/28499 "2018-09-04T22:14:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaushal\_Shriyan](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@Kaushal\_Shriyan](https://forum.ansible.com/u/Kaushal_Shriyan)\
**Post date:** [September 4, 2018, 10:14pm UTC](https://forum.ansible.com/t/view-remote-shell-script-output-to-the-controller-node-terminal-screen/28499/1 "2018-09-04T22:14:48Z")

</div>

Hi,

Is there a way to see the remote shell script output to the controller node terminal screen (stdout) ? I have the below shell script on a remote node.

- name: Execute the script  
#command: sh /opt/installaio.sh  
raw: /opt/installaio.sh  
#script: /opt/installaio.sh  
register: out

- debug:  
var: out.stdout\_lines

On Remote client nodes

cat /opt/installaio.sh

curl [http://software.internalreposandbox.com/bootstrap\_4.17.09.sh](http://software.internalreposandbox.com/bootstrap_4.17.09.sh) -o /tmp/bootstrap\_4.17.09.sh  
bash /tmp/bootstrap\_4.17.09.sh user=“deployuser” password=“password”

/opt/apigee/apigee-service/bin/apigee-service apigee-setup install  
/opt/apigee/apigee-setup/bin/setup.sh -p aio -f /opt/configfile

Any help will be highly appreciable.

Thanks in Advance.

Best Regards,

Kaushal

---

<div class="post-metadata">

**Author:** ![Kaushal\_Shriyan](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@Kaushal\_Shriyan](https://forum.ansible.com/u/Kaushal_Shriyan)\
**Post date:** [September 6, 2018, 2:35am UTC](https://forum.ansible.com/t/view-remote-shell-script-output-to-the-controller-node-terminal-screen/28499/2 "2018-09-06T02:35:41Z")

</div>

Hi,

I will appreciate if someone can pitch in for my earlier post to this group. Thanks in Advance.

Best Regards,

Kaushal

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [September 6, 2018, 9:13pm UTC](https://forum.ansible.com/t/view-remote-shell-script-output-to-the-controller-node-terminal-screen/28499/3 "2018-09-06T21:13:10Z")

</div>

If the log file is generated in the /tmp/ folder you can use the fetch command to copy the log back to the ansible controller and use whatever method you want to display the content (maybe shell module with cat command)

An example of the fetch module is sohwn below

- name: Copy /tmp/cluster\_api\_status back for troubleshooting  
fetch:  
src: /tmp/cluster\_api\_status  
dest: fetch/cluster\_api\_status\_{{ inventory\_hostname }}.log  
validate\_checksum: no  
flat: yes  
changed\_when: false
