# register won't read

**URL:** <https://forum.ansible.com/t/register-wont-read/26123>\
**Category:** Ansible Developer\
**Created:** [November 24, 2017, 10:04am UTC](https://forum.ansible.com/t/register-wont-read/26123 "2017-11-24T10:04:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pranay\_Nanda](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@Pranay\_Nanda](https://forum.ansible.com/u/Pranay_Nanda)\
**Post date:** [November 24, 2017, 10:04am UTC](https://forum.ansible.com/t/register-wont-read/26123/1 "2017-11-24T10:04:22Z")

</div>

Hi! I'm new to Ansible. I'm trying to run these plays but I get an error  
that says  
AILED! =\> {"msg": "The task includes an option with an undefined variable.  
The error was: 'dict object' has no attribute 'stderr'\n\nThe error appears  
to have been in '/home/ansible/playbooks/testfile.yml': line 14, column 7,  
but may\nbe elsewhere in the file depending on the exact syntax  
problem.\n\nThe offending line appears to be:\n\n msg: \"STDOUT - {{  
ansible\_os\_family }}\"\n - debug:\n ^ here\n\nexception type: \<class  
'ansible.errors.AnsibleUndefinedVariable'\>\nexception: 'dict object' has no  
attribute 'stderr'"}

---- hosts: db tasks: - name: copy file to server copy: src=test.sh  
dest=/home/ansible/test.sh mode=0755 - name: Run the script command:  
/home/ansible/test.sh register: out ignore\_errors: yes - debug: msg:  
"STDOUT - {{ ansible\_os\_family }}" - debug: msg: "{{ out.stderr }}"  
Please Help!!

---

<div class="post-metadata">

**Author:** ![Karol\_Czeryna](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@Karol\_Czeryna](https://forum.ansible.com/u/Karol_Czeryna)\
**Post date:** [November 24, 2017, 10:18am UTC](https://forum.ansible.com/t/register-wont-read/26123/2 "2017-11-24T10:18:42Z")

</div>

HI Pranay!

You’re trying to display stderr which is “standard error output” - if your script is not returning it - this variable is empty / does not exist.

First of all please check what is displayed by raw {{ out }} and probably what you’re looking for is {{ out.stdout }}.

Best,  
Karol
