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
131182cd
Commit
131182cd
authored
6 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
add PostGreSQL conf setup to ansible
Former-commit-id: 480e23ffaa55fea2d42e885a01f027a324e27e97
parent
79ad338c
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
+19
-0
19 additions, 0 deletions
ansible/deploy.yaml
with
19 additions
and
0 deletions
ansible/deploy.yaml
+
19
−
0
View file @
131182cd
...
...
@@ -72,6 +72,25 @@
insertbefore=BOF
-
name
:
restart postgresql service
systemd
:
state=restarted name=postgresql enabled=yes
-
become
:
yes
become_user
:
ippidb
gather_facts
:
no
vars
:
dbname
:
ippidb
dbuser
:
ippidb
dbpassword
:
'
LeroyMerlin'
tasks
:
-
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
#
# 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