# host variables

**URL:** <https://forum.ansible.com/t/host-variables/16540>\
**Category:** Ansible Project\
**Created:** [October 17, 2014, 5:09pm UTC](https://forum.ansible.com/t/host-variables/16540 "2014-10-17T17:09:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Soyer](https://avatars.discourse-cdn.com/v4/letter/f/5daacb/32.png) [@Frank\_Soyer](https://forum.ansible.com/u/Frank_Soyer)\
**Post date:** [October 17, 2014, 5:09pm UTC](https://forum.ansible.com/t/host-variables/16540/1 "2014-10-17T17:09:28Z")

</div>

Hi staff,  
I just find a small bug, tell me if you knew it.  
I was using an old version (1.1 !) and launched playbooks like that :

in /etc/ansible/hosts :  
myserver mysql\_password=“123456”  
using {{ mysql\_password }} somewhere in the code.

in playbook :

- host = $host

and at command line :  
ansible-playbook myplaybook.yml -e host=myserver

All works find, but… I just update ansible to 1.7, interested by the stat command.  
First I find that in playbook I must now say :

- hosts : “{{ host }}”  
instead of $host. OK no problem, I haven’t tons of playbooks !  
But I had a host like this in hosts file:  
otherserver mysql\_password=“12#3456”

and got the error :  
…  
File “/usr/lib64/python2.6/shlex.py”, line 172, in read\_token  
raise ValueError, “No closing quotation”  
ValueError: No closing quotation

I’ve found that I must escape the # (“12#3456”) to have it to work. Seems to return the right password without the "". I know that I could check all this password to escape the #, but I’m so lazy, and as the string is quoted, it looks like a bug, isn’t it ?  
Other characters like “$” “%” “,” “;” are not problematic.

Thanks  
Frank

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 20, 2014, 9:06pm UTC](https://forum.ansible.com/t/host-variables/16540/2 "2014-10-20T21:06:48Z")

</div>

Tracebacks are errors, so please report this one on GitHub with how to reproduce it.

Thanks!
