-
Notifications
You must be signed in to change notification settings - Fork 18
/
galaxy-db_playbook.yml
40 lines (40 loc) · 1.37 KB
/
galaxy-db_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
- hosts: galaxy-db
become: true
vars_files:
- group_vars/all.yml
- group_vars/galaxy_etca.yml
- group_vars/VAULT
- group_vars/dbservers.yml
- host_vars/galaxy-db.usegalaxy.org.au.yml
- secret_group_vars/stats_server_vault
- secret_group_vars/ubuntu_maintenance_key
pre_tasks:
- name: Attach volume to instance
include_role:
name: attached-volumes
- name: Install psycopg2 for python3
apt:
name: python3-psycopg2
state: present
become: true
- name: stat data directory
stat:
path: "{{ postgresql_pgdata }}"
register: data_directory_stat
- name: override postgresql_objects_privileges if data directory does not yet exist
set_fact:
postgresql_objects_privileges: "{{ postgresql_objects_privileges_first_run }}"
when: not data_directory_stat.stat.exists
roles:
- common
- insspb.hostname
- geerlingguy.pip
- galaxyproject.postgresql
- move-postgresql-data-directory
- role: galaxyproject.postgresql_objects
become: true
become_user: postgres
- dj-wasabi.telegraf
# Note: After running this playbook for the first time the postgresql services
# may have stopped with errors due to the moving of the data directory.
# A reboot should fix this.