Skip to content

Commit 3eadb46

Browse files
authored
Merge pull request #8 from stackhpc/client-support
Enable the definition of clients to Slurm
2 parents 4b7cd1d + 1648482 commit 3eadb46

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
openhpc_slurm_service_enabled: true
3-
openhpc_slurm_service: slurmd
4-
openhpc_slurm_control_host:
3+
openhpc_slurm_service:
4+
openhpc_slurm_control_host:
55
openhpc_slurm_partitions: []
66
openhpc_cluster_name:
77
openhpc_packages: []

handlers/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
service:
44
name: "{{ openhpc_slurm_service }}"
55
state: reloaded
6-
when: openhpc_slurm_service_enabled | bool
6+
when:
7+
- openhpc_slurm_service is not none
8+
- openhpc_slurm_service_enabled | bool
79

810
- name: Restart Munge service
911
service:

tasks/runtime.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
- "slurm-example-configs-ohpc"
1717
state: installed
1818

19-
- name: Ensure the SLURM spool directory exists
19+
- name: Ensure the Slurm spool directory exists
2020
file:
2121
path: /var/spool/slurm
2222
owner: slurm
@@ -53,10 +53,11 @@
5353
notify:
5454
- Restart Munge service
5555

56-
- name: Ensure SLURM services are enabled
56+
- name: Ensure Slurm services are enabled
5757
service:
5858
name: "{{ openhpc_slurm_service }}"
5959
enabled: "{{ openhpc_slurm_service_enabled | bool }}"
60+
when: openhpc_slurm_service is not none
6061
notify:
6162
- Restart SLURM service
6263

@@ -75,10 +76,11 @@
7576

7677
# In case the service isn't running and the config hasn't changed to trigger
7778
# the handler, ensure it's running here.
78-
- name: Ensure SLURM services are running
79+
- name: Ensure Slurm services are running
7980
service:
8081
name: "{{ openhpc_slurm_service }}"
8182
state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}"
83+
when: openhpc_slurm_service is not none
8284

8385
# Install OpenHPC runtime
8486
- name: Ensure selected OpenHPC packages are installed

0 commit comments

Comments
 (0)