Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iPPIDB
ippidb-web
Commits
a5d05580
Commit
a5d05580
authored
6 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
postgresql ansible wip
(with help from
@bbrancot
) Former-commit-id: 17ca1fd4ddd424433338097b58951fd52887d0b7
parent
5eca3b34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansible/deploy.yaml
+5
-9
5 additions, 9 deletions
ansible/deploy.yaml
with
5 additions
and
9 deletions
ansible/deploy.yaml
+
5
−
9
View file @
a5d05580
...
...
@@ -71,7 +71,7 @@
-
name
:
Ensure PostgreSQL is listening on all localhost
lineinfile
:
dest=/var/lib/pgsql/data/postgresql.conf
regexp='^#?listen_addresses\s*='
line="listen_addresses = '
127.0.0.1
'"
line="listen_addresses = '
*
'"
state=present
-
lineinfile
:
dest=/var/lib/pgsql/data/pg_hba.conf
regexp='host\s+all\s+all\s+127.0.0.1/32\s+md5'
...
...
@@ -79,14 +79,10 @@
insertbefore=BOF
-
name
:
restart postgresql service
systemd
:
state=restarted name=postgresql enabled=yes
-
name
:
ensure database is created
postgresql_db
:
name={{dbname}}
-
name
:
ensure user has access to database
postgresql_user
:
db={{dbname}} name={{dbuser}} password={{dbpassword}} priv=ALL
-
name
:
ensure user does not have unnecessary privilege
postgresql_user
:
name={{dbuser}} role_attr_flags=NOSUPERUSER,NOCREATEDB
-
name
:
ensure no other user can access the database
postgresql_privs
:
db={{dbname}} role=PUBLIC type=database priv=ALL state=absent
-
postgresql_user
:
name
:
{{
dbuser
}}
password
:
{{
dbpassword
}}
role_attr_flags
:
CREATEDB,NOSUPERUSER
#
# Stop web server(s)
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment