# Using raw passwords with ansible\_password directly in playbooks deprecated?

**URL:** <https://forum.ansible.com/t/using-raw-passwords-with-ansible-password-directly-in-playbooks-deprecated/34133>\
**Category:** Ansible Project\
**Created:** [October 30, 2020, 4:14pm UTC](https://forum.ansible.com/t/using-raw-passwords-with-ansible-password-directly-in-playbooks-deprecated/34133 "2020-10-30T16:14:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Miller](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Matt\_Miller](https://forum.ansible.com/u/Matt_Miller)\
**Post date:** [October 30, 2020, 4:14pm UTC](https://forum.ansible.com/t/using-raw-passwords-with-ansible-password-directly-in-playbooks-deprecated/34133/1 "2020-10-30T16:14:12Z")

</div>

The reasoning behind not revealing username/passwords directly in playbooks is obvious and speaks for itself.

However, I am calling playbooks from an application that includes credential security/management, and provides credentials at runtime.

For this reason, including ansible\_user/ansible\_password directly in our playbook invocations works well.

My question …

I seem to recall seeing something about this method of providing credentials has been tagged as deprecated, but now I can’t find where it says so. Is this method being deprecated, or am i mis-recollecting?

Thanks,  
Matt

---

<div class="post-metadata">

**Author:** ![cassell](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@cassell](https://forum.ansible.com/u/cassell)\
**Post date:** [October 30, 2020, 4:40pm UTC](https://forum.ansible.com/t/using-raw-passwords-with-ansible-password-directly-in-playbooks-deprecated/34133/2 "2020-10-30T16:40:24Z")

</div>

You're doing it properly. There is also ansible\_ssh\_pass, but that's been emphasized less in favor of the ansible\_password transport-agnostic version.

V/r,  
James Cassell

---

<div class="post-metadata">

**Author:** ![Matt\_Miller](https://avatars.discourse-cdn.com/v4/letter/m/db5fbb/32.png) [@Matt\_Miller](https://forum.ansible.com/u/Matt_Miller)\
**Post date:** [October 30, 2020, 5:18pm UTC](https://forum.ansible.com/t/using-raw-passwords-with-ansible-password-directly-in-playbooks-deprecated/34133/3 "2020-10-30T17:18:30Z")

</div>

Hmmm. I could of sworn I remembered seeing something to that affect. Anyway, great to hear.

Thanks James!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 3, 2020, 3:48pm UTC](https://forum.ansible.com/t/using-raw-passwords-with-ansible-password-directly-in-playbooks-deprecated/34133/4 "2020-11-03T15:48:46Z")

</div>

both generic and specific will work (it is defined by each connection  
plugin some even have many variations), just note that the specific  
has greater precedence so if you use both with ssh, ansible\_ssh\_pass  
will override ansible\_password.
