Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
71b35d59
Commit
71b35d59
authored
Aug 05, 2013
by
Dimitris Aragiorgis
Committed by
Christos Stavrakakis
Aug 20, 2013
Browse files
Allow password-less access from db node in db
Signed-off-by:
Dimitris Aragiorgis
<
dimara@grnet.gr
>
parent
c79d864a
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-deploy/fabfile.py
View file @
71b35d59
...
...
@@ -409,10 +409,10 @@ def setup_mq():
@
roles
(
"db"
)
def
allow_access_in_db
(
ip
):
def
allow_access_in_db
(
ip
,
user
=
"all"
,
trust
=
""
):
cmd
=
"""
echo host all
all {0
}/32 md5 >> /etc/postgresql/8.4/main/pg_hba.conf
"""
.
format
(
ip
)
echo host all
{0} {1
}/32 md5
{2}
>> /etc/postgresql/8.4/main/pg_hba.conf
"""
.
format
(
user
,
ip
,
trust
)
try_run
(
cmd
)
try_run
(
"/etc/init.d/postgresql restart"
)
...
...
@@ -436,6 +436,7 @@ def setup_db():
try_run
(
cmd
)
try_run
(
"/etc/init.d/postgresql restart"
)
allow_access_in_db
(
"127.0.0.1"
,
"postgres"
,
"trust"
)
@
roles
(
"db"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment