|
1 | 1 | AutoDetect=off
|
2 | 2 | {% for nodegroup in openhpc_nodegroups %}
|
3 |
| -{% for gres in nodegroup.gres | default([]) %} |
4 |
| -{% set gres_name, gres_type, _ = gres.conf.split(':') %} |
5 |
| -{% set inventory_group_name = openhpc_cluster_name ~ '_' ~ nodegroup.name %} |
6 |
| -{% set inventory_group_hosts = groups.get(inventory_group_name, []) %} |
| 3 | +{% set gres_list = nodegroup.gres | default([]) %} |
| 4 | +{% set gres_autodetect = nodegroup.gres_autodetect | default('off') %} |
| 5 | +{% set inventory_group_name = openhpc_cluster_name ~ '_' ~ nodegroup.name %} |
| 6 | +{% set inventory_group_hosts = groups.get(inventory_group_name, []) %} |
| 7 | +{% if gres_autodetect | default('off') != 'off' %} |
7 | 8 | {% for hostlist in (inventory_group_hosts | hostlist_expression) %}
|
8 |
| -NodeName={{ hostlist }} Name={{ gres_name }} Type={{ gres_type }} File={{ gres.file }} |
| 9 | +NodeName={{ hostlist }} AutoDetect={{ gres_autodetect }} |
9 | 10 | {% endfor %}{# hostlists #}
|
10 |
| -{% endfor %}{# gres #} |
| 11 | +{% else %} |
| 12 | +{% for gres in gres_list %} |
| 13 | +{% set gres_name, gres_type, _ = gres.conf.split(':') %} |
| 14 | +{% for hostlist in (inventory_group_hosts | hostlist_expression) %} |
| 15 | +NodeName={{ hostlist }} Name={{ gres_name }} Type={{ gres_type }} File={{ gres.file | mandatory('The gres configuration dictionary: ' ~ gres ~ ' is missing the file key, but gres_autodetect is set to off. The error occured on node group: ' ~ nodegroup.name ~ '. Please add the file key or set gres_autodetect.') }} |
| 16 | +{% endfor %}{# hostlists #} |
| 17 | +{% endfor %}{# gres #} |
| 18 | +{% endif %}{# autodetect #} |
11 | 19 | {% endfor %}{# nodegroup #}
|
0 commit comments