Skip to content
Announcing BigAnimal: Fully managed PostgreSQL in the Cloud
Postgres Build 2021: 30 Nov to 1 Dec
Contact usDocsPlans

Get More Out of edb-ansible Scripts: Creating “Credentials” in Ansible Tower

Doug Ortiz4/22/2021
Cloud

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:  

Red Hat Ansible Tower

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:

  1. Cloud Credentials - Authentication towards the Cloud hosting our resources
  2. 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:

  1. Under Resources -> Credentials on the left hand navigation
  2. Click Credentials Button on the left hand navigation
  3. Click the Green Plus Sign on the right hand side of the browser
  4. Enter the name of the credential, for example: GCloud
  5. Select matching Organization from the ORGANIZATION Dropdown
  6. Select matching Cloud from the CREDENTIAL TYPE Dropdown - *The next steps will vary depending on the Cloud Vendor you are utilizing*
  7. Click the Green SAVE Button

The completed credential should like similar to the screenshot below:

Red Hat Ansible Tower

Create the Cloud Private Key Credentials

In the Ansible Tower interface, perform the following actions:

  1. Under Resources -> Credentials on the left hand navigation
  2. Click Credentials Button on the left hand navigation
  3. Click the Green Plus Sign on the right hand side of the browser
  4. Enter the name of the credential, for example: GCloud
  5. Select matching Organization from the ORGANIZATION Dropdown
  6. Select matching Cloud from the CREDENTIAL TYPE Dropdown - *The next steps will vary depending on the Cloud Vendor you are utilizing*
  7. Click the Green SAVE Button

The completed cloud private key credential should like similar to the screenshot below:

Red Hat Ansible Tower

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!
 

Doug Ortiz is a Postgres DevOps Engineer at EDB. Doug's skills encompass multiple platforms such as: AWS, Azure, GCP, Big Data, Data Analytics, DevOps, Linux, Kubernetes, Docker, Terraform, Ansible, Python, Scala, GraphQL, .Net, SharePoint, Office, Neo4J, MySQL, PostgreSQL and SQL Server.  He posses ...