Appendix C. Creating an encrypted credentials.yml file
This section describes how to create an encrypted credentials.yml file that is passed to the Ansible Automation Platform installer.
The passwords used must match between Environment A and Environment B.
Within your initial Environment B Ansible Automation Platform environment,
Create a credentials.yml file to store the encrypted credentials
cat credentials.yml
$ cat credentials.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow admin_password: my_long_admin_password pg_password: my_long_pg_password registry_password: my_long_registry_password
admin_password: my_long_admin_password pg_password: my_long_pg_password registry_password: my_long_registry_passwordCopy to Clipboard Copied! Toggle word wrap Toggle overflow Encrypt the credentials.yml file using
ansible-vaultansible-vault encrypt credentials.yml
$ ansible-vault encrypt credentials.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow New Vault password: Confirm New Vault password: Encryption successful
New Vault password: Confirm New Vault password: Encryption successfulCopy to Clipboard Copied! Toggle word wrap Toggle overflow WarningThe
admin_passwordandpg_passwordcredentials need to match the value used in your Ansible Automation Platform 1.2 Environment A.WarningEnsure to store your encrypted vault password in a safe location.
Verify the credentials.yml file is encrypted
cat credentials.yml
$ cat credentials.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The creation of encrypted credentials is optional but recommended as storing passwords within your inventory file should not be in plain text.
If you are already using encrypted credentails, use your credentials.yml file instead of creating a new one.