diff --git a/docs/docsite/rst/user_guide/vault.rst b/docs/docsite/rst/user_guide/vault.rst index cb4ae48e90c..ae0618748ed 100644 --- a/docs/docsite/rst/user_guide/vault.rst +++ b/docs/docsite/rst/user_guide/vault.rst @@ -218,7 +218,7 @@ To encrypt the string 'letmein' read from stdin, add the vault ID 'test' using t The command above creates this output:: - Reading plaintext input from stdin. (ctrl-d to end input) + Reading plaintext input from stdin. (ctrl-d to end input, twice if your content does not already have a new line) db_password: !vault | $ANSIBLE_VAULT;1.2;AES256;dev 61323931353866666336306139373937316366366138656131323863373866376666353364373761 @@ -237,7 +237,7 @@ The command above triggers this prompt: .. code-block:: text - Reading plaintext input from stdin. (ctrl-d to end input) + Reading plaintext input from stdin. (ctrl-d to end input, twice if your content does not already have a new line) Type the string to encrypt (for example, 'hunter2'), hit ctrl-d, and wait. diff --git a/lib/ansible/cli/vault.py b/lib/ansible/cli/vault.py index e80318b70ee..c20613b3f0d 100644 --- a/lib/ansible/cli/vault.py +++ b/lib/ansible/cli/vault.py @@ -312,7 +312,7 @@ class VaultCLI(CLI): # read from stdin if self.encrypt_string_read_stdin: if sys.stdout.isatty(): - display.display("Reading plaintext input from stdin. (ctrl-d to end input)", stderr=True) + display.display("Reading plaintext input from stdin. (ctrl-d to end input, twice if your content does not already have a newline)", stderr=True) stdin_text = sys.stdin.read() if stdin_text == '':