Skip to content

Commit

Permalink
Newline fixes for loops in the template
Browse files Browse the repository at this point in the history
  • Loading branch information
natefoo committed Jan 30, 2019
1 parent 3aa56e1 commit f848599
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions templates/slurm.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ ControlMachine=localhost

# 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 %}
NodeName=localhost State=UNKNOWN
{% endfor %}


# 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 %}
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 %}

0 comments on commit f848599

Please sign in to comment.