-
Notifications
You must be signed in to change notification settings - Fork 1
/
basic-compute-install.yml
83 lines (83 loc) · 2.31 KB
/
basic-compute-install.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
- hosts: elcapitan_compute
order: sorted
strategy: free
tasks:
- name: ensure a list of packages are not installed
yum:
name: "{{ packages }}"
state: absent
vars:
packages:
- yelp
- yelp-libs
- yelp-xls
- name: ensure epel is installed
yum:
state: latest
name: 'epel-release'
- name: ensure all packages are up-to-date
yum:
state: latest
name: '*'
- name: ensure necessary software are installed
yum:
name: ipmitool,nfs-utils,dnf,rsync
state: latest
- name: ensure convenient software are installed
yum:
name: htop,wget,tree,dnf
state: latest
- name: Ensure fstab can mount coraid, and is mounted
mount:
path: /home
state: unmounted
- name: Ensure fstab can mount coraid, and is mounted
mount:
path: /home
src: 192.168.0.70:/mnt/md0
fstype: nfs
opts: defaults,rw,noatime
state: mounted
boot: yes
- name: Ennsure rpms build dir exists for later copy
file:
state: directory
path: /root/rpmbuild/RPMS
owner: root
group: root
- name: copy slurm install rpms
synchronize:
src: /root/rpmbuild/RPMS
dest: /root/rpmbuild/RPMS
- name: copy slurm install srpms
synchronize:
src: /root/rpmbuild/SRPMS
dest: /root/rpmbuild/SRPMS
- name: Check if slurm.rpm is installed
command: rpm -q slurm
failed_when: no
ignore_errors: True
register: slurm_check
- name: Install slurm RPM if slurm is not installed
command: yum install /root/rpmbuild/RPMS/RPMS/x86_64/slurm-slurmd-19.05.2-1.el7.x86_64.rpm /root/rpmbuild/RPMS/RPMS/x86_64/slurm-19.05.2-1.el7.x86_64.rpm -y
when: slurm_check.rc == 1
- name: setup slurmd
yum:
state: present
name: munge, slurm-slurmd
- name: copy munge key for compute nodes to recognize the head node controller and vice versa
synchronize:
src: /etc/munge/munge.key
dest: /etc/munge/munge.key
- name: Add a line to a file if the file does not exist, without passing regexp
lineinfile:
path: /etc/hosts
line: 192.168.0.237 elcapitan3a
state: present
- name: Create the slurm conf directory
file:
path: /etc/slurm
owner: root
group: root
mode: '666'
state: directory