# Change in vars\_prompt behavior for 2.x

**URL:** <https://forum.ansible.com/t/change-in-vars-prompt-behavior-for-2-x/19293>\
**Category:** Ansible Developer\
**Created:** [September 17, 2015, 8:27pm UTC](https://forum.ansible.com/t/change-in-vars-prompt-behavior-for-2-x/19293 "2015-09-17T20:27:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Peacock](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@John\_Peacock](https://forum.ansible.com/u/John_Peacock)\
**Post date:** [September 17, 2015, 8:27pm UTC](https://forum.ansible.com/t/change-in-vars-prompt-behavior-for-2-x/19293/1 "2015-09-17T20:27:33Z")

</div>

I opened a ticket [https://github.com/ansible/ansible/issues/12297](https://github.com/ansible/ansible/issues/12297) which was closed as won’t fix. I think that decision was flawed, and I’d like to make the argument here.

Basically, the old vars\_prompt default was to display what the user typed unless you explicitly passed `private: yes` in the call. This is also how the documentation is written.

However, this behavior was recently changed so that now you must pass `private: no` if you want to see the characters as you type. As I said on the ticket, I think this assumes that the majority of prompts will be passwords, which certainly doesn’t match our usage. We have playbook variables that must be set for which there is no sane default (e.g. hostnames), so I prompt for them if they were not passed on the command line. This is a much nicer behavior of adhoc playbook testing prior to deployment with a automation tool like Bamboo.

At least give me a config option I can use to switch the default.

Thanks

John

---

<div class="post-metadata">

**Author:** ![esco\_real](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@esco\_real](https://forum.ansible.com/u/esco_real)\
**Post date:** [September 18, 2015, 11:57am UTC](https://forum.ansible.com/t/change-in-vars-prompt-behavior-for-2-x/19293/2 "2015-09-18T11:57:58Z")

</div>

Hello John,

For me, this change also makes no sense. It was already good and for me it wasn’t the majority of this to ask for passwords…

But it looks like that this decision is made…

The other points:  
Using asterisk wouldn’t be consistent and I like the standard behavior.  
In my opinion changing the behavior of playbooks by configuration for this sensitive part wouldn’t be a good solution?

esco

---

<div class="post-metadata">

**Author:** ![Jonathan\_Mainguy](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@Jonathan\_Mainguy](https://forum.ansible.com/u/Jonathan_Mainguy)\
**Post date:** [September 18, 2015, 12:35pm UTC](https://forum.ansible.com/t/change-in-vars-prompt-behavior-for-2-x/19293/3 "2015-09-18T12:35:18Z")

</div>

I like the idea of a config option to set the default. Making default one way or the other is fine, however giving people the option to weigh risks and set their own default is best.

---

<div class="post-metadata">

**Author:** ![Florian\_Apolloner](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@Florian\_Apolloner](https://forum.ansible.com/u/Florian_Apolloner)\
**Post date:** [September 18, 2015, 12:49pm UTC](https://forum.ansible.com/t/change-in-vars-prompt-behavior-for-2-x/19293/4 "2015-09-18T12:49:24Z")

</div>

I am against a config var, this will require third party authors of roles to always set private yes|no, since they cannot rely on a sane behaviour on the enduser side… That said I’d also vote for private=no as default.
