# Error while adding variables and comparing them with another variable in 'when'

**URL:** <https://forum.ansible.com/t/error-while-adding-variables-and-comparing-them-with-another-variable-in-when/14233>\
**Category:** Ansible Project\
**Created:** [December 29, 2013, 10:12pm UTC](https://forum.ansible.com/t/error-while-adding-variables-and-comparing-them-with-another-variable-in-when/14233 "2013-12-29T22:12:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![boochi\_shiva](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@boochi\_shiva](https://forum.ansible.com/u/boochi_shiva)\
**Post date:** [December 29, 2013, 10:12pm UTC](https://forum.ansible.com/t/error-while-adding-variables-and-comparing-them-with-another-variable-in-when/14233/1 "2013-12-29T22:12:10Z")

</div>

hi all,  
I’m trying run the below playbook and facing an exception

ansbile version : 1.4.3  
os : debian wheezy

playbook:

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [December 29, 2013, 11:42pm UTC](https://forum.ansible.com/t/error-while-adding-variables-and-comparing-them-with-another-variable-in-when/14233/2 "2013-12-29T23:42:03Z")

</div>

Thanks!

Can you please report this one on github ([github.com/ansible/ansible](http://github.com/ansible/ansible)) so we don’t lose track of it?

I believe I know the swap on swap off technique from the Karate Kid.

---

<div class="post-metadata">

**Author:** ![boochi\_shiva](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@boochi\_shiva](https://forum.ansible.com/u/boochi_shiva)\
**Post date:** [December 30, 2013, 7:53am UTC](https://forum.ansible.com/t/error-while-adding-variables-and-comparing-them-with-another-variable-in-when/14233/3 "2013-12-30T07:53:22Z")

</div>

Thanks, have created the issue ticket ([https://github.com/ansible/ansible/issues/5456](https://github.com/ansible/ansible/issues/5456)).  
Btw i had totally forgotten miyagi, how crass :-/. watching it today again… ur awesome 🙂

---

<div class="post-metadata">

**Author:** ![boochi\_shiva](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@boochi\_shiva](https://forum.ansible.com/u/boochi_shiva)\
**Post date:** [December 30, 2013, 1:37pm UTC](https://forum.ansible.com/t/error-while-adding-variables-and-comparing-them-with-another-variable-in-when/14233/4 "2013-12-30T13:37:25Z")

</div>

Hi,  
Created a generic playbook to reproduce the error

Playbook:
