Is there a way to avoid the password prompt in pg_basebackup? I'm attempting to get a server provisioned using ansible, meaning that I can't type in a password. I'm doing a master-slave topology and I need to run pg_basebackup on the slave machine to accomplish this. I've looked into using .pgpass, but that appears to be for my shell user, not the postgres account.

Is this possible? Or will I have to make a manual stage in my deployment?
Create a .pgpass in the home directory for the postgres user, or whatever user you run pg_basebackup as.

Link to the manual: http://www.postgresql.org/docs/current/static/libpq-pgpass.html