Newline fixes for loops in the template

This commit is contained in:
Nate Coraor 2019-01-29 23:09:26 -05:00
parent 3aa56e1699
commit f848599618
1 changed files with 5 additions and 4 deletions

View File

@ -16,15 +16,16 @@ ControlMachine=localhost
# Nodes # Nodes
{% for i in slurm_nodes %} {% for i in slurm_nodes %}
NodeName={{ i.name }}{% for k in i | sort %} {{ k }}={{ i[k] }}{% endfor %} NodeName={{ i.name }}{% for k in i | sort if k != 'name' %} {{ k }}={{ i[k] }}{% endfor %}
{% else %} {% else %}
NodeName=localhost State=UNKNOWN NodeName=localhost State=UNKNOWN
{% endfor %} {% endfor %}
# Partitions # Partitions
{% for i in slurm_partitions %} {% for i in slurm_partitions %}
PartitionName={{ i.name }}{% for k in i | sort %} {{ k }}={{ i[k] }}{% endfor %} PartitionName={{ i.name }}{% for k in i | sort if k != 'name' %} {{ k }}={{ i[k] }}{% endfor %}
{% else %} {% else %}
PartitionName=debug Default=YES Nodes={{ slurm_nodes[0] | default('localhost') }} State=UP PartitionName=debug Default=YES Nodes={{ (slurm_nodes[0] | default({})).name | default('localhost') }} State=UP
{% endfor %} {% endfor %}