# register not support variable

**URL:** <https://forum.ansible.com/t/register-not-support-variable/16798>\
**Category:** Ansible Project\
**Created:** [November 15, 2014, 4:33pm UTC](https://forum.ansible.com/t/register-not-support-variable/16798 "2014-11-15T16:33:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Can\_Shen](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@Can\_Shen](https://forum.ansible.com/u/Can_Shen)\
**Post date:** [November 15, 2014, 4:33pm UTC](https://forum.ansible.com/t/register-not-support-variable/16798/1 "2014-11-15T16:33:49Z")

</div>

now . I has run two comands and register the two variable , when I call the variable ， the variable Unavailable (undefined)

flowing is my playbook：

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [November 15, 2014, 4:51pm UTC](https://forum.ansible.com/t/register-not-support-variable/16798/2 "2014-11-15T16:51:51Z")

</div>

The value of register can not be a variable. You must statically define it such as:

register: cange

Additionally, ‘register’ works a little differently with loops such as with\_items. See \<[http://docs.ansible.com/playbooks\_loops.html#using-register-with-a-loop](http://docs.ansible.com/playbooks_loops.html#using-register-with-a-loop)\>
