title: Ansible to Conditionally Prompt for a Variable?
body: <p>I would like to be able to prompt for my super secure password variable if it is not already in the environment variables. (I'm thinking that I might not want to put the definition into .bash_profile or one of the other spots.)</p>
  
  <p>This is not working. It always prompts me. </p>
  
  <pre><code>vars:
    THISUSER: "{{ lookup('env','LOGNAME') }}"
    SSHPWD:   "{{ lookup('env','MY_PWD') }}"
  
  vars_prompt:
    - name: "release_version"
      prompt: "Product release version"
      default: "1.0"
      when: SSHPWD == null
  </code></pre>
  
  <p><strong>NOTE:</strong> I'm on a Mac, but I'd like for any solutions to be platform-independent.</p>