add warnings for the stding usage examples (#51859)

* Add a warning about vault leaving secrets in the shell history.
* Add a warning about accidental newlines in vault encrypted strings.

+label: docsite_pr
pull/53666/head
Richlv 6 years ago committed by Alicia Cozine
parent de2531e275
commit 4c1476932e

@ -180,6 +180,10 @@ To encrypt a string read from stdin and name it 'db_password':
echo -n 'letmein' | ansible-vault encrypt_string --vault-id dev@a_password_file --stdin-name 'db_password' echo -n 'letmein' | ansible-vault encrypt_string --vault-id dev@a_password_file --stdin-name 'db_password'
.. warning::
This method leaves the string in your shell history. Do not use it outside of testing.
Result:: Result::
Reading plaintext input from stdin. (ctrl-d to end input) Reading plaintext input from stdin. (ctrl-d to end input)
@ -204,6 +208,10 @@ Output::
User enters 'hunter2' and hits ctrl-d. User enters 'hunter2' and hits ctrl-d.
.. warning::
Do not press Enter after supplying the string. That will add a newline to the encrypted value.
Result:: Result::
new_user_password: !vault | new_user_password: !vault |

Loading…
Cancel
Save