From 3efc8b6de8222c1009eef5016902547ad174a6df Mon Sep 17 00:00:00 2001 From: Andrew Klychkov Date: Thu, 1 Oct 2020 23:34:23 +0300 Subject: [PATCH] Docsite: update user_guide/playbooks_prompts (#72049) --- .../rst/user_guide/playbooks_prompts.rst | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/docsite/rst/user_guide/playbooks_prompts.rst b/docs/docsite/rst/user_guide/playbooks_prompts.rst index 5900a26c742..856f7037735 100644 --- a/docs/docsite/rst/user_guide/playbooks_prompts.rst +++ b/docs/docsite/rst/user_guide/playbooks_prompts.rst @@ -16,15 +16,16 @@ Here is a most basic example:: vars_prompt: - name: username - prompt: "What is your username?" + prompt: What is your username? private: no - name: password - prompt: "What is your password?" + prompt: What is your password? tasks: - - debug: + - name: Print a message + ansible.builtin.debug: msg: 'Logging in as {{ username }}' The user input is hidden by default but it can be made visible by setting ``private: no``. @@ -36,8 +37,8 @@ If you have a variable that changes infrequently, you can provide a default valu vars_prompt: - - name: "release_version" - prompt: "Product release version" + - name: release_version + prompt: Product release version default: "1.0" Encrypting values supplied by ``vars_prompt`` @@ -47,10 +48,10 @@ You can encrypt the entered value so you can use it, for instance, with the user vars_prompt: - - name: "my_password2" - prompt: "Enter password2" + - name: my_password2 + prompt: Enter password2 private: yes - encrypt: "sha512_crypt" + encrypt: sha512_crypt confirm: yes salt_size: 7 @@ -96,8 +97,8 @@ Allowing special characters in ``vars_prompt`` values Some special characters, such as ``{`` and ``%`` can create templating errors. If you need to accept special characters, use the ``unsafe`` option:: vars_prompt: - - name: "my_password_with_weird_chars" - prompt: "Enter password" + - name: my_password_with_weird_chars + prompt: Enter password unsafe: yes private: yes