When using postgres with linux, linux users can connect to postgres users without a password (This is called Trust Authentication).
On Ubuntu, postgres creates a postgres
linux user which is a postgres-superuser - and can create databases and more postgres users.
To make things easier - let's make our sysop
user a postgres superuser as well!
@task
def create_postgres_su():
run("sudo -u postgres createuser -s sysop")
run("createdb sysop")
and run:
fab create_postgres_su