In our series about integrating EDB “edb-ansible” scripts with Ansible Tower, we learned how to deploy a Postgres Cluster by integrating edb-ansible scripts with Ansible Tower. In this tutorial, we look at finding the credentials required to authenticate into our recently deployed Postgres Cluster from the Ansible Tower Template Job.
Locating your credentials from the job logs of an executed Ansible Tower Template
Once an Ansible Tower Template has been executed as a job, the output of that job is displayed in an output window with all of the related details of the playbook run. While there are search capabilities within the Ansible Tower User Interface, it is much easier to export the output as a text file and search within the exported text file.
The deployment creates multiple account credentials, since our purpose is to manage the cluster we only need to focus on two credentials:
Steps to export the output of an Ansible Job Template:
- Within Ansible Tower
- Under Dashboard on the left hand navigation
- Click Jobs Link on the left hand side of the browser
- Locate the job you seek to find the credentials
- Click the <ID> - JOB NAME
- Click the Download Output icon next to the Expand Output Icon, the location is under the Job Template Name and above the yellow line
- Save the file to the desired download location
With the file exported we are ready to search for the two administration credentials we are looking for.
Steps to search for the credentials in the exported file
- Open the exported File
- Search for ‘enterprisedb’, ‘pass’ and copy the entire line into a text file of your choice
- Search for ‘pemadmin’, ‘pass’ and copy the entire line into a text file of your choice
- Utilize the recently found credentials to authenticate into your newly deployed Postgres Cluster
In this post, we have explored the steps for finding the credentials of a recently deployed Postgres Cluster with Ansible Tower integrated with edb-ansible Scripts.