Skip to content

Commit 20b417c

Browse files
committed
Remove conf-server command line option if configless mode is disabled
1 parent 19f5569 commit 20b417c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tasks/runtime.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,20 @@
169169
notify:
170170
- Restart slurmd service
171171

172-
- name: Set slurmctld location for configless operation
172+
- name: Configure slurmd command line options
173+
vars:
174+
slurmd_options_configless: "--conf-server {{ openhpc_slurm_control_host_address | default(openhpc_slurm_control_host) }}"
175+
slurmd_options: ""
173176
lineinfile:
174177
path: /etc/sysconfig/slurmd
175-
line: "SLURMD_OPTIONS='--conf-server {{ openhpc_slurm_control_host_address | default(openhpc_slurm_control_host) }}'"
178+
line: "SLURMD_OPTIONS='{{ slurmd_options_configless if openhpc_slurm_configless | bool else slurmd_options }}'"
176179
regexp: "^SLURMD_OPTIONS="
177180
create: yes
178181
owner: root
179182
group: root
180183
mode: 0644
181184
when:
182185
- openhpc_enable.batch | default(false)
183-
- openhpc_slurm_configless | bool
184186
notify:
185187
- Restart slurmd service
186188
# Reloading is sufficent, but using a single handler means no bounce. Realistically this won't regularly change on a running slurmd so restarting is ok.

0 commit comments

Comments
 (0)