Skip to content
Snippets Groups Projects
Commit e265aec4 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Improve documentation

parent 8b89e49c
No related branches found
No related tags found
No related merge requests found
...@@ -227,21 +227,26 @@ Encrypted variables ...@@ -227,21 +227,26 @@ Encrypted variables
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
`Ansible vault`_ allows to create encrypted variables to embed in yaml using the `ansible-vault encrypt_string`_ command. `Ansible vault`_ allows to create encrypted variables to embed in yaml using the `ansible-vault encrypt_string`_ command.
In the following example *myvariable* is the name of the variable and *acomplexpassword* the secret to encrypt (the content
of the variable).
:: ::
$ ansible-vault encrypt_string -n mypassord acomplexpassword $ ansible-vault encrypt_string -n myvariable acomplexpassword
New Vault password: New Vault password:
Confirm New Vault password: Confirm New Vault password:
mypassord: !vault | myvariable: !vault |
$ANSIBLE_VAULT;1.1;AES256 $ANSIBLE_VAULT;1.1;AES256
33383731306533343464396365336135653261316639643937326134313430313833316438633238 35643065323939633063303738656432333664613764326566663132313962363037663637363161
3237613332396239363134346462653831626237663231360a356235306262333634653036336236 3435383964313936313365366433633139323363393762310a626338663237313063353462623933
32333435306334343839353664396165343861373333613830383762393734393434346633653839 37336566633161303538323934626162626262356337636565353835393538643564343331306338
6139663637336462330a316366326461633964386135346239303338366237383561643034353263 3333316434353931640a386563353131386437376233376362663764633338373530393936353163
66623362333866373530316437366564303332353032643961663435343939633164 39366637633336316239306466643637383165343936623864386366663631363837
Encryption successful Encryption successful
Note that if you exported the **ANSIBLE_VAULT_PASSWORD_FILE** environment variable,
you won't be prompted for the vault password.
You can directly copy/paste the result of the command to CSEntry: You can directly copy/paste the result of the command to CSEntry:
.. image:: _static/ansible/enter_vault_variable.png .. image:: _static/ansible/enter_vault_variable.png
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment