Why Is Ansible Tower Inventory Sync Job Failing With Error 'Attempting to decrypt but no vault secrets found' ?

Solution Verified - Updated -

Issue

I'm using an inventory sourced from a SCM Project with Vaulted vars file using Ansible Vault, with the following structure.

inventories/hosts
inventories/host_vars/host01/vars.yml
inventories/host_vars/host01/vault.yml

(hosts)

[hosts]
host01

(vars.yml)

admin_pass: "{{ admin_password }}"

(vault.yml) … encrypted file by ansible-vault

$ANSIBLE_VAULT;1.1;AES256
34383734303865616238613030383336356436356464393262313134633466376662656561393736
6538646130303039383939636538363163633031636635650a373436353337363936653539376233
32323835396235313633666465383337323239666637333136613831303735663766316637666439
3839356632663538310a356664326363623134333265343965663539303264653538653063666536
65346532383231353035653536343137633962653439306166303961366465386330

The inventory sync using the SCM project, fails with the below error.

RuntimeError: ansible-inventory failed (rc=4) with stdout:
stderr:
ERROR! Attempting to decrypt but no vault secrets found

Environment

Ansible Tower 3.3+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content