Skip to content

Commit f00d351

Browse files
committed
use features to simplify nodeset configuration
1 parent b8c64dc commit f00d351

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/slurm.conf.j2

+2-1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Epilog=/etc/slurm/slurm.epilog.clean
158158
{% set hostlists = (inventory_group_hosts | hostlist_expression) %}{# hosts in inventory group aren't necessarily a single hostlist expression #}
159159
{% for hostlist in hostlists %}
160160
NodeName={{ hostlist }} {{ '' -}}
161+
Feature=nodegroup_{{ nodegroup.name }} {{ '' -}}
161162
State=UNKNOWN {{ '' -}}
162163
RealMemory={{ nodegroup.ram_mb | default(ram_mb) }} {{ '' -}}
163164
Sockets={{first_host_hv['ansible_processor_count'] }} {{ '' -}}
@@ -168,7 +169,7 @@ NodeName={{ hostlist }} {{ '' -}}
168169
{% endfor %}{# hostlists #}
169170
{% endif %}{# 1 or more hosts in inventory #}
170171

171-
NodeSet={{ nodegroup.name }} Nodes={{ ','.join(hostlists | default(['""'])) }}{# no support for creating nodesets by Feature #}
172+
NodeSet=nodegroup_{{ nodegroup.name }} Feature=nodegroup_{{ nodegroup.name }}{# no support for creating nodesets by Feature #}
172173

173174
{% endfor %}
174175

0 commit comments

Comments
 (0)