Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
otree-ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiso-forschungslabor
otree-ansible
Commits
ac504183
Commit
ac504183
authored
5 years ago
by
Gallenkamp, Fabian
Browse files
Options
Downloads
Patches
Plain Diff
started with postgres installation
parent
d7d9b9dc
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
configure_postgresql.yml
+38
-0
38 additions, 0 deletions
configure_postgresql.yml
site.yml
+6
-1
6 additions, 1 deletion
site.yml
with
44 additions
and
1 deletion
configure_postgresql.yml
0 → 100644
+
38
−
0
View file @
ac504183
---
-
name
:
configure postgres dbs
become
:
true
hosts
:
all
tasks
:
# enable PostgreSQL service
-
name
:
ensure postgres service is enabled and running
service
:
name:postgresql
state
:
started
enabled
:
yes
# create databases and logins for the users
-
name
:
create databases
postgresql_db
:
name
:
"
instance_{{
item.key
}}"
encoding
:
"
UTF-8"
lc_collate
:
de_DE.UTF-8
lc_ctype
:
de_DE.UTF-8
template
:
"
template0"
state
:
present
with_dict
:
"
{{
otree_users
}}"
when
:
item.value.override
-
name
:
ensure users have access to the databases
postgresql_user
:
db
:
"
instance_{{
item.key
}}"
name
:
"
{{
item
}}"
name
:
"
{{
item
}}"
priv
:
ALL
state
:
present
with_dict
:
"
{{
otree_users
}}"
when
:
item.value.override
-
name
:
ensure users do not have unnecessary priviliges
postgresql_user
:
role_attr_flags
:
NOSUPERUSER,NOCREATEDB
when
:
item.value.override
This diff is collapsed.
Click to expand it.
site.yml
+
6
−
1
View file @
ac504183
...
...
@@ -4,6 +4,9 @@
hosts
:
all
vars
:
prereq_packages
:
-
openssl
-
libssl-dev
-
libssl-doc
-
python3-pip
-
python3-dev
-
python3-venv
...
...
@@ -12,7 +15,8 @@
-
git
-
nginx
-
supervisor
# maybe add postgresql, postgresql-contriv
-
postgresql
-
postgresql-contrib
tasks
:
# create/delete users as specified in group_vars/otree_users.yml
-
name
:
Create group for otreeusers
...
...
@@ -61,5 +65,6 @@
state
:
latest
-
import_playbook
:
"
configure_nginx.yml"
-
import_playbook
:
"
configure_postgresql.yml"
-
import_playbook
:
"
setup_otree.yml"
-
import_playbook
:
"
setup_firewall.yml"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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