Continuing our blog series on integrating EDB “edb-ansible” scripts with Ansible Tower v3.8.1, this third post of the series will cover Creating “Credentials” for “edb-ansible” Scripts in Ansible Tower. Our previous post walked through Creating “Projects” for “edb-ansible” Scripts in Ansible Tower.
We will be covering the greyed out areas in the diagram below:
Based on Red Hat Ansible User guide
What is an Ansible Tower Credential?
An Ansible Tower Credential is a logical collection of permissions to authenticate against a variety of services such as:
- Cloud
- GitHub
- Network
- Machine
A credential is important because the details of a credential will be utilized to authenticate against other services by other Ansible Tower components ( Projects, Inventories, Templates ).
We will be creating two credentials in total:
- Cloud Credentials - Authentication towards the Cloud hosting our resources
- Cloud Private Key Credentials - Utilized to ssh into the Instances within our Cloud
Create the Cloud Credentials
In the Ansible Tower interface, perform the following actions:
- Under Resources -> Credentials on the left hand navigation
- Click Credentials Button on the left hand navigation
- Click the Green Plus Sign on the right hand side of the browser
- Enter the name of the credential, for example: GCloud
- Select matching Organization from the ORGANIZATION Dropdown
- Select matching Cloud from the CREDENTIAL TYPE Dropdown - *The next steps will vary depending on the Cloud Vendor you are utilizing*
- Click the Green SAVE Button
The completed credential should like similar to the screenshot below:
Create the Cloud Private Key Credentials
In the Ansible Tower interface, perform the following actions:
- Under Resources -> Credentials on the left hand navigation
- Click Credentials Button on the left hand navigation
- Click the Green Plus Sign on the right hand side of the browser
- Enter the name of the credential, for example: GCloud
- Select matching Organization from the ORGANIZATION Dropdown
- Select matching Cloud from the CREDENTIAL TYPE Dropdown - *The next steps will vary depending on the Cloud Vendor you are utilizing*
- Click the Green SAVE Button
The completed cloud private key credential should like similar to the screenshot below:
Summary
Credentials in Ansible Tower are essential to authenticating against the resources in your playbook. If not properly defined or configured they will certainly prevent the successful execution of a playbook. The following blog topics will build into the final step, which will be creating a manual local Project and a Template for its execution.
Stay tuned for the next blog, Configuring Inventories for “edb-ansible” Scripts on Ansible Tower!