Skip to content

Commit

Permalink
Merge pull request #62 from jabl/topology
Browse files Browse the repository at this point in the history
Enable generating topology.conf
  • Loading branch information
martbhell authored Sep 30, 2016
2 parents 2c6ea5d + 27079a1 commit 58d609f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ slurm_accounting_storage_enforce: "safe,qos"
# If you wish to use a topology plugins (parameter TopologyPlugin=),
# uncomment and edit the following:
#slurm_topology_plugin: "topology/tree"
# If you use a topology plugin, you also need a topology.conf
# defined here, one element per line
#slurm_topologylist:
# - "SwitchName=s0 Nodes=c[0-18]"
# - "SwitchName=s1 Nodes=c[19-36]"
# - "SwitchName=s3 Switches=s[0,1]"
slurm_clustername: "{{ siteName | default('test_cluster')}}"
slurm_compute_nodes: "{{ nodeBase }}[1-4]"
slurm_compute_realmemory: "126000"
Expand Down
5 changes: 5 additions & 0 deletions tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
template: src=gres.conf.j2 dest=/etc/slurm/gres.conf owner=root mode=0644
notify: restart slurm

- name: Make from template topology.conf
template: src=topology.conf.j2 dest=/etc/slurm/topology.conf owner=root moder=0644
notify: restart slurm
when: slurm_topology_plugin is defined

- name: Make from template slurm.conf
template: src=slurm.conf.j2 dest=/etc/slurm/slurm.conf owner=root mode=0644 backup=yes
notify: restart slurm
Expand Down
4 changes: 4 additions & 0 deletions templates/topology.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# {{ ansible_managed }}
{% for topo in slurm_topologylist %}
{{ topo }}
{% endfor %}

0 comments on commit 58d609f

Please sign in to comment.