# A pound '#' sign in password

**URL:** <https://forum.ansible.com/t/a-pound-sign-in-password/34240>\
**Category:** Ansible Project\
**Created:** [November 25, 2020, 4:51pm UTC](https://forum.ansible.com/t/a-pound-sign-in-password/34240 "2020-11-25T16:51:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xinhuan\_Zheng](https://avatars.discourse-cdn.com/v4/letter/x/a88e57/32.png) [@Xinhuan\_Zheng](https://forum.ansible.com/u/Xinhuan_Zheng)\
**Post date:** [November 25, 2020, 4:51pm UTC](https://forum.ansible.com/t/a-pound-sign-in-password/34240/1 "2020-11-25T16:51:54Z")

</div>

We want to use ansible to connect to a managed device. We have created a host\_var file with the username and the password. Here is the host\_var/mydevice file:

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [November 25, 2020, 5:07pm UTC](https://forum.ansible.com/t/a-pound-sign-in-password/34240/2 "2020-11-25T17:07:40Z")

</div>

Hi,

have you tried adding quotes?

> username: myuser  
> password: 'secret#secret'

Otherwise YAML might interpret everything after # as a comment.

Cheers,  
Felix
