-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaybook-galaxy.yaml
More file actions
92 lines (84 loc) · 2.72 KB
/
playbook-galaxy.yaml
File metadata and controls
92 lines (84 loc) · 2.72 KB
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
---
# Install/Manage Galaxy
- name: Galaxy
hosts: galaxy_servers
pre_tasks:
- name: Create local tools dir
file:
path: "{{ galaxy_local_tools_dir }}"
state: directory
mode: "0755"
when: galaxy_local_tools is defined
- name: Create additional directories
file:
path: "{{ item }}"
state: directory
mode: "0755"
become: true
become_user: "{{ galaxy_user }}"
loop:
- "{{ galaxy_shared_rw_root }}/tmp/apptainer_cache"
- "{{ galaxy_shared_rw_root }}/tmp/apptainer_tmp"
roles:
- role: galaxyproject.galaxy.venv
- role: galaxyproject.galaxy.clone
- role: galaxyproject.galaxy.version
- role: galaxyproject.galaxy.gravity
- role: galaxyproject.galaxy.config
tags: config
- role: galaxyproject.galaxy.dependencies
- role: galaxyproject.galaxy.state
become_user: "{{ galaxy_user_name }}"
- role: galaxyproject.galaxy.database
become_user: "{{ galaxy_user_name }}"
- role: galaxyproject.galaxy.client
post_tasks:
- name: Remove node_modules
file:
path: "{{ galaxy_server_dir }}/client/node_modules"
state: absent
diff: false
- name: Find plugin node_modules
find:
paths: "{{ galaxy_server_dir }}/config/plugins"
recurse: true
depth: 4 # should get plugins in plugin collection dirs
patterns: node_modules
file_type: directory
register: __galaxy_node_modules_dirs_result
- debug:
var: __galaxy_node_modules_dirs_result.files
- name: Remove plugin node_modules
file:
path: "{{ item.path }}"
state: absent
loop: "{{ __galaxy_node_modules_dirs_result.files }}"
diff: false
- name: Deploy internal tools
ansible.posix.synchronize:
src: "{{ galaxy_server_dir }}/tools/"
dest: "{{ galaxy_config.galaxy.tool_path }}"
archive: true
delete: true
become_user: "{{ galaxy_user }}"
delegate_to: "{{ inventory_hostname }}"
- name: Create job_execution venv for galaxy-set-metadata
ansible.builtin.pip:
name:
- pip
- wheel
state: latest
virtualenv: "{{ job_execution_venv }}"
virtualenv_command: "{{ pip_virtualenv_command }}"
become_user: "{{ galaxy_user }}"
- name: Install galaxy-job-execution and extras
ansible.builtin.pip:
name: "{{ job_execution_packages }}"
virtualenv: "{{ job_execution_venv }}"
become_user: "{{ galaxy_user }}"
- name: Copy welcome.html
ansible.builtin.copy:
src: files/galaxy/static/welcome.html
dest: "{{ galaxy_static_dir }}/welcome.html"
mode: "0644"
tags: welcome