Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
EIT-SWE
Infrastructure
Commits
cdd506f5
Commit
cdd506f5
authored
Nov 06, 2017
by
MICHAEL EUGENE ZALEWSKI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding pgpass file for postgres, vagrant, and root user
parent
2a3c40dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
1 deletion
+29
-1
roles/postgresql_instance/tasks/main.yml
roles/postgresql_instance/tasks/main.yml
+29
-1
No files found.
roles/postgresql_instance/tasks/main.yml
View file @
cdd506f5
...
...
@@ -12,7 +12,9 @@
become
:
true
become_user
:
postgres
-
name
:
create password file on vagrant box
-
name
:
create password file on vagrant box for postgres user
become
:
true
become_user
:
postgres
lineinfile
:
dest
:
~/.pgpass
state
:
present
...
...
@@ -22,3 +24,29 @@
with_items
:
-
"
#hostname:port:database:username:password"
-
"
localhost:5432:{{
db_name
}}:{{
db_user
}}:{{
db_user_pw
}}"
-
name
:
create password file on vagrant box for vagrant user
become
:
true
become_user
:
vagrant
lineinfile
:
dest
:
~/.pgpass
state
:
present
create
:
yes
line
:
"
{{
item
}}"
mode
:
0600
with_items
:
-
"
#hostname:port:database:username:password"
-
"
localhost:5432:{{
db_name
}}:{{
db_user
}}:{{
db_user_pw
}}"
-
name
:
create password file on vagrant box for root user
become
:
true
become_user
:
root
lineinfile
:
dest
:
~/.pgpass
state
:
present
create
:
yes
line
:
"
{{
item
}}"
mode
:
0600
with_items
:
-
"
#hostname:port:database:username:password"
-
"
localhost:5432:{{
db_name
}}:{{
db_user
}}:{{
db_user_pw
}}"
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