-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslurm.yml
95 lines (68 loc) · 1.87 KB
/
slurm.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
- hosts: slurmhead, slurmnode
become: true
roles:
- geerlingguy.java
- dj-wasabi.telegraf
vars_files:
- group_vars/system.yml
- secret_group_vars/system.vault
tasks:
# need to mount /usr/local before adding stuff to it.
- name: mount nfs points
include: tasks/nfs.yml
tags: "nfs"
- name: add repos
include: tasks/repos.yml
tags: repos
- name: Install packages
include: tasks/base_packages.yml
tags: 'base_packages'
- name: Create users and groups
include: tasks/users_groups.yml
tags: 'users'
- name: configure autofs
include: tasks/autofs.yml
tags: autofs
- name: configure slurm basics
include: tasks/slurm_client.yml
tags: slurm-client
- name: configure lmod
include: tasks/lmod_config.yml
tags: lmod_config
- name: copy admin ssh key for easier access to nodes
copy:
src: "~{{ecc_user}}/.ssh/id_rsa"
dest: "~{{ecc_user}}/.ssh"
owner: "{{ecc_user}}"
group: "{{ecc_user}}"
mode: 0400
- name: copy admin ssh key for easier access to nodes
copy:
src: "~{{ecc_user}}/.ssh/id_rsa.pub"
dest: "~{{ecc_user}}/.ssh"
owner: "{{ecc_user}}"
group: "{{ecc_user}}"
mode: 0400
- hosts: slurmhead
become: true
vars_files:
- group_vars/system.yml
tasks:
- name: install slurm head
include: tasks/slurm_head.yml
tags: 'slurm-head'
- name: add ecc_conf to /etc/environment
become_user: root
lineinfile:
dest: "/etc/environment"
state: present
regexp: "^ECC_CONF="
line: "ECC_CONF={{cluster_root}}/etc/ecc.yaml"
- hosts: slurmnode
become: true
vars_files:
group_vars/system.yml
tasks:
- name: install slurmd
include: tasks/slurm_node.yml
tags: 'slurm-node'