module

Krikri::VarsPrompt

vars_prompt: - questions asked once, before the play runs, whose answers become play variables.

Real Ansible only actually PROMPTS on a terminal. With stdin piped or closed it does not read the input at all: it falls back to the entry's default:, or to None when there is none (verified against ansible-core 2.19.4 - piping "bob" to a prompt with default: admin still yields admin). That is what makes the keyword safe in automation, and it is reproduced here.

Class methods

resolve(prompts : Array(Hash(String, String))) : Hash(String, JSON::Any)

Resolves prompts into variables, asking on a TTY and falling back to defaults otherwise.

Source