vars_prompt

Collection: builtin

Full Name: parallax.builtin.vars_prompt

Aliases: ansible.builtin.vars_prompt, vars_prompt

Synopsis

Prompt the operator for a variable value

Parameters

NameTypeRequiredDefaultDescription
namestringyesThe variable name to store user input in
promptstringThe prompt message to display to the user
defaultstringDefault value if user provides empty input
privateboolfalseWhether the input should be hidden (like password input)
encryptstringWhich hashing scheme to encrypt the input with Choices: des_crypt, bsdi_crypt, md5_crypt, bcrypt, sha256_crypt, sha512_crypt
confirmboolfalseRequire the user to enter the value twice
salt_sizeint8Size of the salt to use with the encrypt option
unsafeboolfalseAllow special characters in user input

Example

- name: Ask for the release tag to deploy
  vars_prompt:
    name: release_tag
    prompt: Which tag should be deployed?
    private: false