-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaybook.yml
88 lines (77 loc) · 2.33 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
77
78
79
80
81
82
83
84
85
86
87
88
---
- name: Install Pre-requisites for Pulsar
hosts: "{{ lookup('env', 'variable_host') | default('localhost', true) }}" # workaround because SRC needs localhost, but molecule needs specifc hostvars
roles:
- galaxyproject.repos
- galaxyproject.slurm
post_tasks:
- name: Install Dependencies
ansible.builtin.apt:
update_cache: true
name:
- slurm-drmaa1
- chrony
state: present
- name: deploy chrony.conf template
template:
src: templates/chrony.conf
dest: /etc/chrony.conf
owner: root
group: root
mode: 0644
backup: yes
- name: Restart chronyd
service:
name: chronyd
state: restarted
- name: Install Pulsar Server
hosts: "{{ lookup('env', 'variable_host') | default('localhost', true) }}" # workaround because SRC needs localhost, but molecule needs specifc hostvars
pre_tasks:
# Copied from mirelaminkova/src-component-galaxy
- name: Set workspace user facts
ansible.builtin.include_role:
name: uusrc.general.fact_regular_users
- name: Generate password
set_fact:
pulsar_token: "{{ lookup('community.general.random_string', base64=True, length=24) }}"
- name: Install Dependencies
ansible.builtin.apt:
update_cache: true
name:
- build-essential
- git
- libcurl4-openssl-dev
- libssl-dev
- python3-psycopg2
- python3-virtualenv
- python3-dev
- acl
- gnutls-bin # workaround for git-clone issue, https://stackoverflow.com/a/53147659/4326632
state: present
roles:
- geerlingguy.docker
- galaxyproject.cvmfs
- usegalaxy_eu.apptainer
- uusrc.general.nginx_reverse_proxy
# https://github.com/galaxyproject/pulsar/issues/375
- galaxyproject.pulsar
post_tasks:
- name: Create directory /srv/static/
file:
path: /srv/static/
state: directory
mode: '0755'
- name: Template out the welcome
template:
src: templates/welcome.html
dest: /srv/static/index.html
owner: www-data
group: www-data
mode: '0640'
- name: Deploy epilog
copy:
src: files/epilog.sh
dest: /etc/slurm/epilog.sh
owner: root
group: root
mode: '0755'