# vault\_password\_file how to create?

**URL:** <https://forum.ansible.com/t/vault-password-file-how-to-create/35602>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [August 9, 2021, 10:27am UTC](https://forum.ansible.com/t/vault-password-file-how-to-create/35602 "2021-08-09T10:27:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jiri\_Sachl](https://avatars.discourse-cdn.com/v4/letter/j/a5b964/32.png) [@Jiri\_Sachl](https://forum.ansible.com/u/Jiri_Sachl)\
**Post date:** [August 9, 2021, 10:27am UTC](https://forum.ansible.com/t/vault-password-file-how-to-create/35602/1 "2021-08-09T10:27:31Z")

</div>

Hello. Sorry for my english.

I have Ubuntu server 20.04, ansible core 2.11.3.  
my hosts file has only ip address  
in ansible.cfg is:  
remote\_user = spravce

private\_key\_file = /home/spravce/.ssh/spravce\_id\_rsa.ppk  
vault\_password\_file = /home/spravce/.ssh/password.txt

in .bashrc is :  
export ANSIBLE\_VAULT\_PASSWORD\_FILE=/home/spravce/.ssh/password.txt

i need create vault password file for private ssh key file  
for user “spravce” password maybye “heslo”.

will advise me the correct syntax of the script how to generate this password so that it serves as a password to the private key when logging in to the remote server.

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 9, 2021, 4:47pm UTC](https://forum.ansible.com/t/vault-password-file-how-to-create/35602/2 "2021-08-09T16:47:54Z")

</div>

the vault password is for decrypting ansible content, it will not be  
a passphrase for an ssh key nor can you use a vault encrypted key as  
ansbile just passes the file path to ssh, which itself does not  
understand 'vault'
