Merge pull request #559 from mjschultz/postgres-db-fix

Build the db connection on `"postgres"` instead of `"template1"`
This commit is contained in:
Brian Coca 2015-02-11 17:38:34 -05:00
commit 02af66d232

View file

@ -275,7 +275,7 @@ def main():
kw["host"] = module.params["login_unix_socket"]
try:
db_connection = psycopg2.connect(database="template1", **kw)
db_connection = psycopg2.connect(database="postgres", **kw)
# Enable autocommit so we can create databases
if psycopg2.__version__ >= '2.4.2':
db_connection.autocommit = True