forked from ARTbio/GalaxyKickStart
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gonramp.yml
163 lines (132 loc) · 3.82 KB
/
gonramp.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
- hosts: all
become: yes
gather_facts: false
environment: "{{ proxy_env }}"
handlers:
- include: roles/handlers/galaxy.yml
static: yes
pre_tasks:
- fail: msg="Installed ansible version {{ ansible_version.full }}, but ansible version later than 2.1 required"
when: "{{ ansible_version.full is version('2.1.0.0', '<') }}"
tags: always
- name: install python 2
apt:
update_cache: yes
name:
- python-minimal
tags: always
- setup:
tags: always
- name: generate new API key
shell: "export LC_ALL=C ; cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1"
args:
executable: /bin/bash
register: new_api_key
when: generate_api_key
tags:
- always
- api_keygen
- name: switch API keys
set_fact:
default_admin_api_key: "{{ new_api_key.stdout | trim }}"
when: generate_api_key
tags:
- always
- api_keygen
- name: check local_usr
become: False
local_action: command whoami
register: whom
tags:
- always
# this will get a platform- appropriate IP: VMs get the host-only address
- include: roles/gonramp/tasks/get_ip.yml
tags: always
- fail:
msg: "ERROR: {{ ansible_distribution }} {{ ansible_distribution_version }} is not supported"
when: (ansible_distribution != "Ubuntu") or
(ansible_distribution_version != "16.04" and ansible_distribution_version < "18.04")
- name: update apt
apt:
update_cache: yes
- set_fact:
banner_img: "{% if 'jetstream' in group_names %}jetstream_text.png{% else %}gce_text.png{% endif %}"
tags: always
- ipify_facts: # get host ip in "{{ ipify_public_ip }}"
tags:
- always
roles:
- role: openjdk
become: yes
become_user: root
tags:
- openjdk
- role: galaxyprojectdotorg.galaxy-os
become: yes
become_user: root
tags:
- install_galaxy
- install_packages
- role: cloud_setup
when: cloud_setup is defined
- role: ensure_postgresql_up
tags:
- install_galaxy
- manage_postgres
- role: natefoo.postgresql_objects
postgresql_objects_users:
- name: "{{ galaxy_user_name }}"
password: "{{ galaxy_user_name }}"
postgresql_objects_databases:
- name: "{{ galaxy_user_name }}"
owner: "{{ galaxy_user_name }}"
become: yes
become_user: postgres
tags:
- install_galaxy
- manage_postgres
- role: galaxyprojectdotorg.galaxy
become: yes
become_user: "{{ galaxy_user_name }}"
tags:
- configure_galaxy
- install_galaxy
- role: set_supervisor_env_vars
tags: env_vars
- role: copy_additional_files
tags:
- install_extras
# Installs supervisor, nginx and proftpd
- role: galaxyprojectdotorg.galaxy-extras
tags:
- configure_server_stack
- install_extras
- role: ensure_postgresql_up
tags:
- manage_postgres
- install_tools
- role: galaxy.movedata
tags:
- persists_galaxy
- role: galaxyprojectdotorg.trackster
tags: configure_galaxy
- role: galaxyprojectdotorg.galaxy-tools
become: yes
become_user: "{{ galaxy_user_name }}"
tags: install_tools
- role: gonramp
hosts: gonramp
tags: gonramp
- role: apollo
tags:
- install_apollo
- role: jbrowse_config
tags:
- config_jbrowse
post_tasks:
- name: Clean apt cache to recover some disk space
shell: apt-get clean
# htop is a placeholder here; see bug report
# https://github.com/ansible/ansible-modules-core/issues/4029
- name: Apt autoremove
apt: autoremove=yes name=htop