-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
executable file
·76 lines (71 loc) · 2.72 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
# The purpose of this playbook is to automate the installation and configuration
# of GAVO DaCHS for more exotic PostgreSQL table space configurations.
# It is targeting a model where:
# - the OS disk is used for the OS, the GAVO DaCHS installation, users, etc;
# - the data (located /data) disk is used for storing PostgreSQL data tables;
# - the nvme (located /nvme) disk is used for storing PostgreSQL index tables.
# The locations for these disks are hardcoded for now, but will be abstracted
# later down the line.
- name: The "easy" way to install, configure and import data into GAVO DaCHS
hosts: dev_group_name
vars_files:
- vars.yml
remote_user: "{{ admin_user }}"
pre_tasks:
- name: Install sudo and other packages
apt:
pkg:
- sudo
- iptables
- acl
- gpg
- vim
- curl
- name: "Add admin user ({{ admin_user }}) to list of sudoers"
lineinfile:
path: /etc/sudoers
line: "{{ admin_user }} ALL=(ALL:ALL) ALL"
state: present
become: true
become_method: sudo
become_user: root
tasks:
- name: Install GAVO DaCHS from the package manager
include_role:
name: install-gavo
vars:
version: "{{ gavo_dachs_info.version }}"
fast_tb_feedname: "{{ gavo_dachs_info.fast_tb_feedname }}"
run_tests: "{{ data_source.run_tests }}"
authority: "{{ meta_details.authority }}"
authority_shortname: "{{ meta_details.authority_shortname }}"
bind_address: "{{ site_details.bind_address }}"
site_name: "{{ site_details.site_name }}"
publisher: "{{ meta_details.publisher }}"
contact_name: "{{ meta_details.contact_name }}"
contact_address: "{{ meta_details.contact_address }}"
contact_email: "{{ meta_details.contact_email }}"
site_description: "{{ meta_details.site_description }}"
creation_date: "{{ meta_details.creation_date }}"
- name: Configure PostgreSQL database for use with GAVO DaCHS
include_role:
name: configure-db
vars:
fast_tb_location: "{{ gavo_dachs_info.fast_tb_location }}"
default_tb_location: "{{ gavo_dachs_info.default_tb_location }}"
- name: Import data into GAVO DaCHS
include_role:
name: load-data
vars:
root_directory: "{{ data_source.root_directory }}"
rd_url: "{{ data_source.rd_url }}"
rd_name: "{{ data_source.rd_name }}"
data_url: "{{ data_source.data_url }}"
data_directory: "{{ data_source.data_directory }}"
data_name: "{{ data_source.data_name }}"
checksum: "{{ data_source.checksum }}"
run_tests: "{{ data_source.run_rd_tests }}"
- name: Run and serve GAVO DaCHS
include_role:
name: restart-and-serve