awx-cli

The send and receive functionality can not backup/restore credentials. The credentials, unencrypted, are never exposed via the API.

Christopher,

Thanks for your answer
So there is no solution to backup/restore the credentials when we upgrade our AWX platform ?
We have a lot of credentials in our AWX…

While you cannot backup credentials already on AWX, you can use awx-cli receive --credential <NAME> on all your credentials (the list can be obtained using awx-cli credential list), then save the output as a json file, fill out the credential part (as the credential itself will be blank) and use awx-cli send <credential_file.json> to restore or push it to a different AWX install.

Of course this has serious security implications and you should take appropriate measures to store such files securely after you’ve filled out the credential part.

Ansible has tower_send and tower_receive modules which wrap the tower-cli functions.
So you could have an encrypted vault file containing the passwords and use receive to get the credentials, merge it with the passwords from the vault and then send it to the new environment.
That way your password is never on disk in a decrypted format.

-John