Red Hat Ansible Automation Platform credential type
Select this credential to access another automation controller instance.
Ansible Automation Platform credentials require the following inputs:
- Red Hat Ansible Automation Platform: The base URL or IP address of the other instance to connect to.
- Username: The username to use to connect to it.
- Password: The password to use to connect to it.
- Oauth Token: If username and password are not used, provide an OAuth token to use to authenticate.
The env injectors for Ansible Automation Platform are as follows:
ManagedCredentialType(
namespace='controller',
....
....
....
injectors={
'env': {
'TOWER_HOST': '{{host}}',
'TOWER_USERNAME': '{{username}}',
'TOWER_PASSWORD': '{{password}}',
'TOWER_VERIFY_SSL': '{{verify_ssl}}',
'TOWER_OAUTH_TOKEN': '{{oauth_token}}',
'CONTROLLER_HOST': '{{host}}',
'CONTROLLER_USERNAME': '{{username}}',
'CONTROLLER_PASSWORD': '{{password}}',
'CONTROLLER_VERIFY_SSL': '{{verify_ssl}}',
'CONTROLLER_OAUTH_TOKEN': '{{oauth_token}}',
}
Access automation controller credentials in an Ansible Playbook Copy linkLink copied!
Copy linkLink copied!
You can get the host, username, and password parameters from a job runtime environment:
vars:
controller:
host: '{{ lookup("env", "CONTROLLER_HOST") }}'
username: '{{ lookup("env", "CONTROLLER_USERNAME") }}'
password: '{{ lookup("env", "CONTROLLER_PASSWORD") }}'