Commit 0bb8935c authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

deploy: Allow access in db from localhost

Allow password-less access in DB from localhost, in order to ease
running of unittests.
parent 61a83857
......@@ -429,6 +429,10 @@ def allow_access_in_db(ip, user="all", method="md5"):
echo host all {0} {1}/32 {2} >> /etc/postgresql/8.4/main/pg_hba.conf
""".format(user, ip, method)
try_run(cmd)
cmd = """
sed -i 's/\(host.*127.0.0.1.*\)md5/\1trust/' /etc/postgresql/8.4/main/pg_hba.conf
"""
try_run(cmd)
try_run("/etc/init.d/postgresql restart")
@roles("db")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment