# register variable being truncated

**URL:** <https://forum.ansible.com/t/register-variable-being-truncated/14470>\
**Category:** Ansible Project\
**Created:** [January 31, 2014, 5:55pm UTC](https://forum.ansible.com/t/register-variable-being-truncated/14470 "2014-01-31T17:55:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Gethings](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@David\_Gethings](https://forum.ansible.com/u/David_Gethings)\
**Post date:** [January 31, 2014, 5:55pm UTC](https://forum.ansible.com/t/register-variable-being-truncated/14470/1 "2014-01-31T17:55:39Z")

</div>

Hi,

I am working with a custom module. Sometimes it returns an error that I want to capture and then act on in another task. I have a register set and ignore\_errors set to True in the playbook. However the msg returned is being truncated to I cannot perform a ‘when’ conditional on its value.

Below output is returned by a custom module:

ok: [capella] =\> {“failure”: true, “item”: “”, “msg”: “[{:severity=\>"error",\n :message=\>\n "WARNING: Chassis configuration for network services has been changed. A system reboot is mandatory. Please reboot the system NOW. Continuing without a reboot might result in unexpected system behavior."}]\n”

This action is in a playbook:  
action: debug msg={{ commit\_error }}

Which produces this output (when using -vvv):

ok: [capella] =\> {  
“item”: “”,  
“msg”: “{umsg:”  
}

Any ideas why this is happening?

---

<div class="post-metadata">

**Author:** ![adam2](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@adam2](https://forum.ansible.com/u/adam2)\
**Post date:** [January 31, 2014, 8:41pm UTC](https://forum.ansible.com/t/register-variable-being-truncated/14470/2 "2014-01-31T20:41:14Z")

</div>

debug: msg="{{ commit error }}"
