Skip to content

Commit

Permalink
updated loop key name to be representative of items
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob Guldberg Aaes committed Nov 14, 2023
1 parent 504cfa5 commit 2c3e70a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/gres.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
##

{% set conf = lookup('vars', item.config) %}
{% for gres in conf | sort %}
{% if gres['NodeName'] is not none %}
NodeName={{ gres['NodeName'] }}{% for key in gres | sort %}{% if key != 'NodeName' %} {{ key }}={{ gres[key] }}{% endif %}{% endfor %}
{% for key in conf | sort %}
{% if key['NodeName'] is not none %}
NodeName={{ key['NodeName'] }}{% for key in key | sort %}{% if key != 'NodeName' %} {{ key }}={{ key[key] }}{% endif %}{% endfor %}
{% else %}
{% set val = conf[key] %}
{% set val = key[key] %}
{% if val is not none and val != omit %}
{{ key }}={{ 'yes' if val is sameas true else ('no' if val is sameas false else val) }}
{% endif %}
Expand Down

0 comments on commit 2c3e70a

Please sign in to comment.