Skip to content

Commit ffd6a21

Browse files
authored
Delay slurm service start
until munge service up and package install is done
1 parent 5483af6 commit ffd6a21

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

tasks/runtime.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,15 @@
7171
notify:
7272
- Restart SLURM service
7373

74+
# Install OpenHPC runtime
75+
- name: Ensure selected OpenHPC packages are installed
76+
yum:
77+
name: "{{ openhpc_packages }}"
78+
state: present
79+
7480
- name: Flush handlers
7581
meta: flush_handlers
7682

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-
8583
# Munge state could be unchanged but the service is not running.
8684
# Handle that here.
8785
- name: Ensure Munge services are enabled and started
@@ -90,9 +88,12 @@
9088
enabled: "{{ openhpc_slurm_service_enabled | bool }}"
9189
state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}"
9290

93-
# Install OpenHPC runtime
94-
- name: Ensure selected OpenHPC packages are installed
95-
yum:
96-
name: "{{ openhpc_packages }}"
97-
state: present
91+
# In case the service isn't running and the config hasn't changed to trigger
92+
# the handler, ensure it's running here.
93+
- name: Ensure Slurm services are running
94+
service:
95+
name: "{{ openhpc_slurm_service }}"
96+
state: "{{ 'started' if openhpc_slurm_service_enabled | bool else 'stopped' }}"
97+
when: openhpc_slurm_service is not none
98+
9899
...

0 commit comments

Comments
 (0)