# Does \`ansible-navigator\` not support passing vault-password file?

**URL:** <https://forum.ansible.com/t/does-ansible-navigator-not-support-passing-vault-password-file/4307>\
**Category:** Get Help\
**Tags:** ansible-navigator\
**Created:** [March 11, 2024, 9:30am UTC](https://forum.ansible.com/t/does-ansible-navigator-not-support-passing-vault-password-file/4307 "2024-03-11T09:30:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShanDesai](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@ShanDesai](https://forum.ansible.com/u/ShanDesai)\
**Post date:** [March 11, 2024, 9:30am UTC](https://forum.ansible.com/t/does-ansible-navigator-not-support-passing-vault-password-file/4307/1 "2024-03-11T09:30:15Z")

</div>

## Issue

I have an inventory where some of the device based passwords are encrypted via Ansible-Vault.

I am running `ansible-navigator` **v3.6.0** on WSL2 Windows 10.

### Project structure

I am following the Ansible Runner project structure:

```bash
.
├── README.md
├── ansible.cfg
├── artifacts
├── env
├── inventory
├── project # a .vaultpass plain-text password file exists here

```

In an normal scenario:

```bash
ansible-inventory -i inventory --vault-password-file=project/.vaultpass --list --yaml

```

gives me the list the complete inventory

however, the followiing with `ansible-navigator`:

```bash
ansible-navigator inventory -i ./inventory --vault-password-file=project/.vaultpass

```

throws:

```auto
Errors were encountered while gathering inventory:
ERROR! Attempting to decrypt but vault secrets found

```

What is the appropriate way to work with `ansible-navigator` and a vaulted inventory?

---

<div class="post-metadata">

**Author:** ![james.sanders](https://avatars.discourse-cdn.com/v4/letter/j/9de053/32.png) [@james.sanders](https://forum.ansible.com/u/james.sanders)\
**Post date:** [May 8, 2024, 8:17am UTC](https://forum.ansible.com/t/does-ansible-navigator-not-support-passing-vault-password-file/4307/2 "2024-05-08T08:17:20Z")

</div>

The workaround I use is to create an ansible config file ‘ansible.cfg’ and add parameter ‘vault\_password\_file’ as you would when using the old ansible-playbook. For example:

#cat ansible.cfg  
[defaults]  
vault\_password\_file = ~/.rhv/vault-secret

Then add ansible config file to ansible-navigator.yml. For example:

#cat ansible-navigator.yml  
ansible-navigator:  
ansible:  
config:  
path: ansible.cfg  
inventory:  
entries:  
- inventory

Now use ansible-navigator as you normally would. It should pick up the device passwords.
