-
Notifications
You must be signed in to change notification settings - Fork 5
/
genomics_workspace_playbook.yml
50 lines (43 loc) · 1.24 KB
/
genomics_workspace_playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
- hosts: localhost
strategy: debug
gather_facts: false
name: "\e[34m\e[1m Genomics Workspace Playbook \e[0m "
vars:
postgres_user: postgres
django_user: django
django_user_passwd: django1234
tasks:
- name: Create Database Roles
postgresql_user:
name: "{{ django_user }}"
password: "{{ django_user_passwd }}"
login_host: "{{ postgres_user }}"
login_user: "{{ postgres_user }}"
role_attr_flags: CREATEDB,NOSUPERUSER
- name: Create Genomics Workspace Database
postgresql_db:
name: "{{ django_user }}"
owner: "{{ django_user }}"
login_host: "{{ postgres_user }}"
login_user: "{{ postgres_user }}"
state: present
- name: Make Django Migrations
shell: python3 manage.py makemigrations
args:
chdir: /usr/local/i5k
warn: false
- name: Migrate The Database
shell: python3 manage.py migrate
args:
chdir: /usr/local/i5k
warn: false
- name: Install Binaries
shell: python3 setup.py
args:
chdir: /usr/local/i5k
warn: false
- name: Seed The Database
shell: python3 manage.py seed
args:
chdir: /usr/local/i5k
warn: false