Arseniyyy/pg-start-devops-test-task ? reverse-engineered prompt

Reverse engineered prompt

Build me a small shell based DevOps setup that installs PostgresPro on a remote server from my local machine.

I want one main script that takes two server IP addresses, checks which one is less loaded, and runs the install on that host. Please include separate install scripts for AlmaLinux and Debian, since the target server might be either of those. Also add a helper script to stop and remove the Docker container on a given server before and after the install.

Make it simple to run from the project folder, using an SSH key already copied to both servers and a pgpassword file with the database password. If you need to look up current command details or package install steps online, do that. Try to keep the scripts easy to understand and safe to rerun.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab