Skip to content

Commit 5aca744

Browse files
authored
Merge pull request #18 from stackhpc/issue17
Delay slurm service start
2 parents 01f85a6 + 75593bf commit 5aca744

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

tasks/runtime.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,6 @@
7171
notify:
7272
- Restart SLURM service
7373

74-
- name: Flush handlers
75-
meta: flush_handlers
76-
77-
# In case the service isn't running and the config hasn't changed to trigger
78-
# the handler, ensure it's running here.
79-
- name: Ensure Slurm services are running
80-
service:
81-
name: "{{ openhpc_slurm_service }}"
82-
state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}"
83-
when: openhpc_slurm_service is not none
84-
85-
# Munge state could be unchanged but the service is not running.
86-
# Handle that here.
87-
- name: Ensure Munge services are enabled and started
88-
service:
89-
name: munge
90-
enabled: "{{ openhpc_slurm_service_enabled | bool }}"
91-
state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}"
92-
9374
# Install OpenHPC runtime
9475
- name: Ensure selected OpenHPC packages are installed
9576
yum:
@@ -101,3 +82,21 @@
10182
name: "lmod-ohpc"
10283
state: present
10384

85+
- name: Flush handlers
86+
meta: flush_handlers
87+
88+
# Munge state could be unchanged but the service is not running.
89+
# Handle that here.
90+
- name: Ensure Munge services are enabled and started
91+
service:
92+
name: munge
93+
enabled: "{{ openhpc_slurm_service_enabled | bool }}"
94+
state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}"
95+
96+
# In case the service isn't running and the config hasn't changed to trigger
97+
# the handler, ensure it's running here.
98+
- name: Ensure Slurm services are running
99+
service:
100+
name: "{{ openhpc_slurm_service }}"
101+
state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}"
102+
when: openhpc_slurm_service is not none

0 commit comments

Comments
 (0)