Playbook failing to use vault secret

Hi, I’m trying to run a playbook on AWX 17.1.0 to encrypt a file.
I am getting an error saying: “Decryption failed (no vault secrets were found that could decrypt)”.
I have the vault password as a credential. The secret is in the code.
The same playbook runs on AWX 15.0.1.

Let’s assume there’s not some bug in AWX 17.1.0. (My 1st mistake?)

If it works on AWX 15.0.1 but fails on AWX 17.1.0, then something must be wrong with the credential definition on the latter.

  • Since AWX won’t show you the string, the only way to check for inadvertent leading or trailing spaces or other typos is to edit the credential and re-input the string.
    Failing that…
  • Check the credential type (“Vault”)
  • Check the credential name in both the credential definition and the relevant AWX project’s job template(s). (Not supposed to be possible to be wrong, but there’s a short list of straws to grasp at here.)
  • Check that the Organization of the credential and the project match.
  • Are you using the credential’s “Vault Identifier”? (If so, how’s that working out for you? I haven’t, at least not in AWX. Hmm.)

I’m out of other ideas. You’ve probably done all that several times I bet.

3 Likes

Hello,

Have you added your credential to the template job already? That’s what I use to forget when setting-up template jobs with encrypted vars in a vault:

Cheers

1 Like

Yes I had been using the incorrect vault password. Thank you.

1 Like

Excellent! I’m glad that you could fix it that quick :slight_smile: If you think my post helped you fix your issue, feel free to tick the “solved” checkbox, so other people with the same problem can benefit from it also.

Have a nice day!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.