File tree Expand file tree Collapse file tree 2 files changed +42
-1
lines changed
Expand file tree Collapse file tree 2 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,30 @@ permissions.
8989Note that this role requires root access, so enable ``become`` either globally in your playbook / on the commandline or
9090just for the role like [shown below](#example-playbooks).
9191
92+ # # Topology Configuration
93+
94+ To configure Slurm topology, define the `slurm_topology_config` variable as a
95+ text block containing the desired content for `topology.conf`.
96+
97+ **Important:** If you set `slurm_topology_config`, you must also set
98+ `TopologyPlugin` in your `slurm_config` (e.g., `TopologyPlugin :
99+ topology/tree`).
100+
101+ Example :
102+ ` ` ` yaml
103+ slurm_topology_config: |
104+ SwitchName=s0 Nodes=tux[0-1]
105+ SwitchName=s1 Nodes=tux[2-3]
106+ SwitchName=s2 Switches=s[0-1]
107+
108+ slurm_config:
109+ TopologyPlugin: "topology/tree"
110+ # ... other config ...
111+ ` ` `
112+
113+ The `topology.conf` file will only be deployed to controller nodes (those
114+ running `slurmctld`).
115+
92116Dependencies
93117------------
94118
Original file line number Diff line number Diff line change 4747
4848- name : Include job_submit.lua installation tasks
4949 ansible.builtin.include_tasks : job_submit_lua.yml
50- when : slurm_job_submit_lua is defined
50+ when : slurm_job_submit_lua is defined
51+
52+ - name : Fail if slurm_topology_config is set but TopologyPlugin is not defined
53+ ansible.builtin.fail :
54+ msg : " slurm_topology_config is set, but TopologyPlugin is not defined in slurm_config. Please set TopologyPlugin (e.g., 'topology/tree')."
55+ when :
56+ - slurm_topology_config is defined
57+ - (slurm_config.TopologyPlugin is not defined) or (slurm_config.TopologyPlugin | length == 0)
58+
59+ - name : Deploy topology.conf if slurm_topology_config is defined
60+ ansible.builtin.copy :
61+ content : " {{ slurm_topology_config }}"
62+ dest : " {{ slurm_config_dir }}/topology.conf"
63+ owner : root
64+ group : root
65+ mode : 0644
66+ when :
67+ - slurm_topology_config is defined
You can’t perform that action at this time.
0 commit comments