-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclimb.yml
84 lines (77 loc) · 2.09 KB
/
climb.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
---
- name: Prepare VM for running Ansible
hosts: all
gather_facts: no
tasks:
- name: Ensure Python is installed
script: |
install-py2.sh {{ ansible_python_interpreter|default("/usr/bin/python") }}
args:
creates: '{{ ansible_python_interpreter|default("/usr/bin/python") }}'
become: yes
- name: Install requirement on master and nodes
hosts: cardiff
gather_facts: no
become: yes
roles:
- role: etchosts
hosts_groupname: cardiff
- role: ryanolson.singularity
singularity_version: 2.4.2
- role: geerlingguy.docker
# - role: r
- name: Slurm master Playbook
hosts: slurm_master
become: yes
gather_facts: yes
vars_files:
- group_vars/all
ignore_errors: yes
roles:
- role: nfs-server
NFS_EXPORTS:
- path: '/home'
clients: "{{groups.slurm_worker + groups.slurm_submit|default([])}}"
- slurm-master
- { role: miniconda, become: no }
- name: Slurm worker nodes Playbook
hosts: slurm_worker
become: yes
gather_facts: yes
roles:
- role: 'nfs-client'
NFS_MOUNTS:
- fs: '{{groups.slurm_master[0]}}:/home'
mountpoint: '/home'
- role: autofs
- slurm-worker
- name: Restart Slurmctld on head node
become: yes
hosts: slurm_master
tasks:
- service:
name=slurmctld
state=restarted
when: '{{is_debian_compatible}} and ({{is_debian_8_or_later}} or {{is_ubuntu_15_10_or_later}})'
# Install conda and nextflow
- include: conda.yml
- name: Restart SLURMd after all config is done
become: yes
hosts: slurm_worker
tasks:
- service:
name=slurmd
state=restarted
when: '{{is_debian_compatible}} and ({{is_debian_8_or_later}} or {{is_ubuntu_15_10_or_later}})'
- service:
name=slurm-llnl
state=restarted
when: '{{is_debian_compatible}} and (not ({{is_debian_8_or_later}} or {{is_ubuntu_15_10_or_later}}))'
- service:
name=slurmd
state=restarted
when: '{{is_rhel7_compatible}}'
- service:
name=slurm
state=restarted
when: '{{is_rhel6_compatible}}'