-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.yml
94 lines (85 loc) · 2.38 KB
/
test.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
---
# This playbook tests all aspects of any working slurm deployments.
# both development(docker-compose), production(VM, baremetal)
- hosts: all
gather_facts: false
tasks:
- name: Test can ls all machine
shell: /bin/ls
check_mode: no
- hosts: localhost
gather_facts: false
tasks:
- name: "Check ansible version !=2.7.0"
assert:
msg: "Ansible V2.7.0 can't be used until: https://github.com/ansible/ansible/issues/46600 is fixed"
that:
- ansible_version.string is version("2.7.0", "!=")
- ansible_version.string is version("2.5.0", ">=")
- hosts: "{{ groups['all'] | difference(['localhost', 'mysql-1', 'nfs', 'freeipa-1']) }}"
gather_facts: false
name: Check common/slurm_common packages and services to all nodes
remote_user: ansible
roles:
- common
- slurm_common
- hosts: slurmctld
gather_facts: false
name: Check all slurmctcld (Head node) nodes are running
remote_user: ansible
tasks:
- name: ensure that slurmctld service are started
systemd:
name: "slurmctld"
state: started
enabled: yes
check_mode: yes
- hosts: slurmdbd
gather_facts: false
name: Check all slurmdbd node are running
remote_user: ansible
tasks:
- name: ensure that slurmdbd service are started
systemd:
name: "slurmdbd"
state: started
enabled: yes
check_mode: yes
- hosts: computes
gather_facts: false
name: Check all slurmd (Computes) nodes are running
remote_user: ansible
tasks:
- name: ensure that slurmd service are started
systemd:
name: "slurmd"
state: started
enabled: yes
check_mode: yes
- hosts: tara-frontend-1
gather_facts: false
tasks:
- name: Test sinfo
shell: sinfo
check_mode: no
- name: Test sacctmgr list cluster
shell: sacctmgr list cluster
check_mode: no
- name: Test srun -N 2 hostname
shell: srun -N 2 hostname
register: hostlist_result
check_mode: no
- hosts: "{{ groups['all'] | difference(['localhost', 'mysql-1', 'nfs', 'freeipa-1']) }}"
gather_facts: false
name: Check gpfs functionallity
remote_user: ansible
tasks:
- name: Retrieve file result from all nodes.
stat:
path: /gpfs/test.txt
register: file_result
- name:
assert:
msg: "All frontend, head nodes, compute nodes see exact same file over /gpfs dir"
that:
- file_result.stat.exists