Setup and configure PgAdmin with servers and scripts

bunglehaze
Tue, 29 Aug 2023 12:13:54 +0000
Get Help

Morning all, I am looking around at ways in which i can leverage ansible in order to automate a PGAdmin setup in docker to make configuring it much simpler.

The system we have now is:

docker-compose to build pgadmin and set up with it’s username and password.

then manually:
Add each server with it’s own port number - 9 instances of this
Then go into each server and execute a query to set everything up - again 9 instances of this
each server has it’s own port, but the username and password are the same throughout as it’s only for connecting to Azure DevOps and an internal process for end to end testing

What i would like to achieve is that I setup a playbook that will be able to automate that entire setup so that we can tear down the container simply, then bring it all back up again with fresh servers and ready to go without then needing to query each db afterwards.

Eventually, my aim will be to use Ansible to setup and configure the 21 other containers we use as part of the same process but without the pgadmin side of things being automated the rest are relatively low priority to figure out as they are simple images.

My question is, can the PGAdmin server setup be done in Ansible as I would like?

I know that pgadmin themselves do have a way to use a servers.json but I cannot include a password in this file which may make that pointless to try, then as well as this I do need to be able to go into each of the servers and execute their reset query so it looked more like something Ansible would be better for anyway as I could then roll all of the other containers into a single process.

Thanks

7 posts - 3 participants

Read full topic