How does `vars_prompt` work?
IntermediateConceptPlaybooks, Plays, Tasks and Handlers
Answer
At the start of a play Ansible asks the operator for values and stores them as variables.
vars_prompt:
- name: release_version
prompt: "Version to deploy"
private: false
default: "latest"
- name: db_password
prompt: "DB password"
private: true
Prompts do not appear in non-interactive runs like AWX or CI, where you must pass -e extras or use a survey instead. Extra vars override prompts, so a prompt is skipped when the variable is already given.