# ERROR! Attempting to decrypt but no vault secrets found

**URL:** <https://forum.ansible.com/t/error-attempting-to-decrypt-but-no-vault-secrets-found/3826>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [February 12, 2024, 1:55pm UTC](https://forum.ansible.com/t/error-attempting-to-decrypt-but-no-vault-secrets-found/3826 "2024-02-12T13:55:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noctis81](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/noctis81/32/2271_2.png) [@Noctis81](https://forum.ansible.com/u/Noctis81)\
**Post date:** [February 12, 2024, 1:55pm UTC](https://forum.ansible.com/t/error-attempting-to-decrypt-but-no-vault-secrets-found/3826/1 "2024-02-12T13:55:39Z")

</div>

**ERROR! Attempting to decrypt but no vault secrets found**.

Hello, I installed AWX 23.5.1 on openshift v4.14 through Openshift Operator  
Installation is fine.  
I try to import an inventory from a github repository. In my repository, I have some vault encrypted files and I have the password to decrypt it.  
First I created a new kind of credentials because vault does not appear by default in the list  
I configured this entry like this :

```auto
Name : Vault
Entry configuration : 
fields:
  - id: token
    type: string
    label: MOT DE PASSE VAULT
    secret: true
  - id: identifiant
    type: string
    label: IDENTIFIANT ARCHIVAGE SÉCURISÉ
required:
  - token
Injector configuration : 
---

```

After I was able to create a new credential with my vault password to decrypt vault files in my github repo :

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/3/3a0ec169c6ee3a90001f7fece5bb9169790edb31.png)

When I run a synchronization I got an error about vault :

```auto
ansible-inventory [core 2.15.9]
  config file = /runner/project/ansible.cfg
  configured module search path = ['/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/requirements_collections:/runner/.ansible/collections:/usr/share/ansible/collections:/usr/share/automation-controller/collections
  executable location = /usr/local/bin/ansible-inventory
  python version = 3.9.18 (main, Jan 4 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/usr/bin/python3)
  jinja version = 3.1.3
  libyaml = True
Using /runner/project/ansible.cfg as config file
host_list declined parsing /runner/project/inventories/ocpnp01/inventory_namespaces as it did not pass its verify_file() method
script declined parsing /runner/project/inventories/ocpnp01/inventory_namespaces as it did not pass its verify_file() method
auto declined parsing /runner/project/inventories/ocpnp01/inventory_namespaces as it did not pass its verify_file() method
Parsed /runner/project/inventories/ocpnp01/inventory_namespaces inventory source with ini plugin
ERROR! Attempting to decrypt but no vault secrets found

```

And I when I delete the vault file in my github repository, the synchronization works fine !

Could you help me please ?

Thank you in advance !

- #ansible #vault #inventory #awx #github

---

<div class="post-metadata">

**Author:** ![Noctis81](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/noctis81/32/2271_2.png) [@Noctis81](https://forum.ansible.com/u/Noctis81)\
**Post date:** [February 12, 2024, 1:57pm UTC](https://forum.ansible.com/t/error-attempting-to-decrypt-but-no-vault-secrets-found/3826/2 "2024-02-12T13:57:44Z")

</div>

Below my configuration of inventory :

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/5/556a584c820c4e13c1bbaf713d68a187d27766bb.png)

---

<div class="post-metadata">

**Author:** ![TheRealHaoLiu](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/therealhaoliu/32/100_2.png) [@TheRealHaoLiu](https://forum.ansible.com/u/TheRealHaoLiu)\
**Post date:** [February 27, 2024, 3:44am UTC](https://forum.ansible.com/t/error-attempting-to-decrypt-but-no-vault-secrets-found/3826/3 "2024-02-27T03:44:47Z")

</div>

![image](https://us1.discourse-cdn.com/ansible/original/2X/1/1d8482a0c41e608eee24ea8a4357f689fb64a340.png)  
vault is definitely a default credential type

and its a bit of a special credential type i think AWX use pexpect and `--ask-vault-password` when we try to use a vault credential

---

<div class="post-metadata">

**Author:** ![acozine](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@acozine](https://forum.ansible.com/u/acozine)\
**Post date:** [June 5, 2024, 7:00pm UTC](https://forum.ansible.com/t/error-attempting-to-decrypt-but-no-vault-secrets-found/3826/4 "2024-06-05T19:00:19Z")

</div>

Same issue here. We have vaulted variables files in `/inventory/group_vars/` and we cannot sync the Inventory Source. It seems like the Inventory Source record should have a place to add the Vault credential, but it doesn’t. Anybody know how to get an inventory source syncing with vaulted variables?

---

<div class="post-metadata">

**Author:** ![pankajc80](https://avatars.discourse-cdn.com/v4/letter/p/ea5d25/32.png) [@pankajc80](https://forum.ansible.com/u/pankajc80)\
**Post date:** [March 12, 2025, 11:19am UTC](https://forum.ansible.com/t/error-attempting-to-decrypt-but-no-vault-secrets-found/3826/5 "2025-03-12T11:19:34Z")

</div>

I got this error recently while using the secret.yml file created via ansible-vault and everytime I ran my playbook, got the following error:  
ERROR! Decryption failed (no vault secrets were found that could decrypt) on /home/xxx/xxx/xxx/secret.yml

After changing the extension from **yml** to **yaml** for secret file and updating the playbook to refer secret.yaml, the problem was solved. Not sure when this restriction came into practice however looks unnecessary.
