"Private" variables in vars_prompt

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?

The syntax implemented for ticket 359:

vars_prompt:
    foo: {prompt: "enter foo", encryption: "md5_crypt", confirm: true, salt_size: 7, salt: "foo"}
    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