# Error while reading ansible vaults

**URL:** <https://forum.ansible.com/t/error-while-reading-ansible-vaults/33008>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [May 22, 2020, 4:52pm UTC](https://forum.ansible.com/t/error-while-reading-ansible-vaults/33008 "2020-05-22T16:52:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sv1](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@sv1](https://forum.ansible.com/u/sv1)\
**Post date:** [May 22, 2020, 4:52pm UTC](https://forum.ansible.com/t/error-while-reading-ansible-vaults/33008/1 "2020-05-22T16:52:55Z")

</div>

Hi Team,

While im running below command im getting below error.

vagrant@ubuntu:~/git/ansible-playbooks/playbooks/elasticsearch$ ansible-playbook -i zurich\_test\_vm -e @variables.yaml -u ansible -e “ansible\_ssh\_private\_key\_file=ansible\_id\_rsa” …/…/two-factor-authentication.yaml --vault-id datalaka-auth@prompt --vault-id zurich\_es01@prompt -vvvv

TASK [datalake-auth : Loading secrets from vault.yml] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/vagrant/git/ansible-playbooks/roles/datalake-auth/tasks/main.yml:2  
fatal: [[tester.cdo-infra-elasticsearch-test.zc2.ibm.com](http://tester.cdo-infra-elasticsearch-test.zc2.ibm.com)]: FAILED! =\> {  
“ansible\_facts”: {},  
“ansible\_included\_var\_files”: ,  
“changed”: false,  
“message”: “Could not find or access ‘/home/vagrant/git/ansible-playbooks/playbooks/elasticsearch/vault.yaml’ on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote\_src option”  
}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
[tester.cdo-infra-elasticsearch-test.zc2.ibm.com](http://tester.cdo-infra-elasticsearch-test.zc2.ibm.com) : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

vagrant@ubuntu:~/git/ansible-playbooks/playbooks/elasticsearch$ pwd  
/home/vagrant/git/ansible-playbooks/playbooks/elasticsearch

I dont have any vault in this directory

vagrant@ubuntu:~/git/ansible-playbooks/playbooks/elasticsearch$ ls vault\*  
ls: cannot access ‘vault\*’: No such file or directory

I have vault under my group\_vars  
vagrant@ubuntu:~/git/ansible-playbooks/playbooks/elasticsearch/group\_vars/zurich\_es01$ ls -lrt  
total 4  
-rw------- 1 vagrant vagrant 1715 May 22 16:09 vault

and under my role

vagrant@ubuntu:~/git/ansible-playbooks/roles/datalake-auth/vars$ ls -lrt  
total 24  
-rw-rw-r-- 1 vagrant vagrant 1327 May 22 05:18 vault.yml

I want to use the above two files and i have used the above command but still it is throwing error.

Champs any help much appreciated.

Thanks a lot
