capistrano-plugins/capistrano-postgresql — pull request #7 by rhomeister (2014-10-01 20:33:49+00:00)
Title: Ensure database.yml on newly created clients has correct credentials. fix #5

This commit changes the was database.yml is created. Previously, a randomly
generated password would be created on database set up, but also when a client
does not have the database.yml file. If a new client if created after the db,
it gets a database.yml file with a newly generated random - and incorrect -
password.

In this commit, when the db and db-user are first created, an archetype
database.yml file is created on the primary db role with the credentials
for the db. This is subsequently copied on every setup to all clients, so
newly created clients now also get the right credentials for connecting
to the db.