# "Private" variables in vars\_prompt

**URL:** <https://forum.ansible.com/t/private-variables-in-vars-prompt/11622>\
**Category:** Ansible Project\
**Created:** [June 19, 2012, 3:05pm UTC](https://forum.ansible.com/t/private-variables-in-vars-prompt/11622 "2012-06-19T15:05:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fred\_Alger](https://avatars.discourse-cdn.com/v4/letter/f/c89c15/32.png) [@Fred\_Alger](https://forum.ansible.com/u/Fred_Alger)\
**Post date:** [June 19, 2012, 3:05pm UTC](https://forum.ansible.com/t/private-variables-in-vars-prompt/11622/1 "2012-06-19T15:05:24Z")

</div>

So I found a ‘private’ flag in the on\_vars\_prompt handler that switches between raw\_input() and getpass.getpass(), I’d like to be able to toggle that in my playbooks. Maybe something like:

- vars\_prompt:  
name: password
- prompt: “Please enter your SVN password”
- private: true

release\_version: “Please enter the revision to release:”

I’m not in love with mixing hashes and simple key/value pairs, so maybe this would be better:

- vars\_prompt:  
password: “private:Please enter your SVN password”  
release\_version: “Please enter the revision to release:”

@mgw, Michael mentioned in IRC that there was possibly some encryption logic in vars\_prompt so that it could accept a parameter that was a hash as well?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [June 19, 2012, 3:10pm UTC](https://forum.ansible.com/t/private-variables-in-vars-prompt/11622/2 "2012-06-19T15:10:08Z")

</div>

The syntax implemented for ticket 359:

vars\_prompt:  
&nbsp;&nbsp;&nbsp;&nbsp;foo: {prompt: "enter foo", encryption: "md5\_crypt", confirm: true, salt\_size: 7, salt: "foo"}  
&nbsp;&nbsp;&nbsp;&nbsp;bar: {prompt: "enter bar", encryption: "sha512\_crypt", confirm: false, salt: "foo"}

It looks like this was not reimplemented correctly for 0.5 (no tests to catch that played a role), so right now there are two things

(A) the user specified prompts need to work instead of saying "specify a value for foo"

(B) the various items from pull request 359 should be reinstated.

I don't think the private flag does anything.

--Michael
