|
114 | 114 |
|
115 | 115 | # - name: debug
|
116 | 116 | # debug:
|
117 |
| -# msg: "Replacing line: SwitchName={{upperswitchnames[item]}}\\sSwitches.* with SwitchName={{upperswitchnames[item]}} Switches={{racks_on_switch_dict[item] | difference(switchnames[item]) | join(',') }}" |
| 117 | +# msg: "Replacing line: SwitchName={{upperswitchnames[item]}}\\sSwitches.* with SwitchName={{upperswitchnames[item]}} Switches={{racks_on_switch_dict[item] | difference([switchnames[item]]) | join(',') }}" |
118 | 118 | # with_items: "{{unreachable_slurm_nodes}}"
|
119 |
| -# when: ( not upperswitchnames[item] is match("inactive-.*") ) and ( ( racks_on_switch_dict[item] | difference(switchnames[item]) | length ) > 0 ) and ( upperswitchnames[item] | length ) > 1 |
| 119 | +# when: ( not upperswitchnames[item] is match("inactive-.*") ) and ( ( racks_on_switch_dict[item] | difference([switchnames[item]]) | length ) > 0 ) and ( upperswitchnames[item] | length ) > 1 |
120 | 120 | # run_once: true
|
121 | 121 | # delegate_to: 127.0.0.1
|
122 | 122 |
|
123 | 123 | - name: change upper switch line from topology line
|
124 | 124 | lineinfile:
|
125 | 125 | path: "{{ slurm_conf_path }}/topology.conf"
|
126 | 126 | regexp: "SwitchName={{upperswitchnames[item]}}\\sSwitches.*"
|
127 |
| - line: "SwitchName={{upperswitchnames[item]}} Switches={{racks_on_switch_dict[item] | difference(switchnames[item]) | join(',') }}" |
| 127 | + line: "SwitchName={{upperswitchnames[item]}} Switches={{racks_on_switch_dict[item] | difference([switchnames[item]]) | join(',') }}" |
128 | 128 | state: present
|
129 | 129 | with_items: "{{unreachable_slurm_nodes}}"
|
130 | 130 | ignore_errors: yes
|
131 |
| - when: ( not upperswitchnames[item] is match("inactive-.*") ) and ( ( racks_on_switch_dict[item] | difference(switchnames[item]) | length ) > 0 ) and ( upperswitchnames[item] | length ) > 1 and ( nodes_on_switch[item] | length ) < 2 |
| 131 | + when: ( not upperswitchnames[item] is match("inactive-.*") ) and ( ( racks_on_switch_dict[item] | difference([switchnames[item]]) | length ) > 0 ) and ( upperswitchnames[item] | length ) > 1 and ( nodes_on_switch[item] | length ) < 2 |
132 | 132 | run_once: true
|
133 | 133 | delegate_to: 127.0.0.1
|
134 | 134 |
|
|
137 | 137 | # msg: "removing line line: SwitchName={{upperswitchnames[item]}}\\sSwitches.*"
|
138 | 138 | # with_items: "{{unreachable_slurm_nodes}}"
|
139 | 139 | # ignore_unreachable: yes
|
140 |
| -# when: ( not upperswitchnames[item] is match("inactive-.*") ) and ( ( racks_on_switch_dict[item] | difference(switchnames[item]) | length ) == 0 ) and ( upperswitchnames[item] | length ) > 1 |
| 140 | +# when: ( not upperswitchnames[item] is match("inactive-.*") ) and ( ( racks_on_switch_dict[item] | difference([switchnames[item]]) | length ) == 0 ) and ( upperswitchnames[item] | length ) > 1 |
141 | 141 | # run_once: true
|
142 | 142 | # delegate_to: 127.0.0.1
|
143 | 143 |
|
|
148 | 148 | state: absent
|
149 | 149 | with_items: "{{unreachable_slurm_nodes}}"
|
150 | 150 | ignore_unreachable: yes
|
151 |
| - when: ( not upperswitchnames[item] is match("inactive-.*") ) and ( ( racks_on_switch_dict[item] | difference(switchnames[item]) | length ) == 0 ) and ( upperswitchnames[item] | length ) > 1 and ( nodes_on_switch[item] | length ) < 2 |
| 151 | + when: ( not upperswitchnames[item] is match("inactive-.*") ) and ( ( racks_on_switch_dict[item] | difference([switchnames[item]]) | length ) == 0 ) and ( upperswitchnames[item] | length ) > 1 and ( nodes_on_switch[item] | length ) < 2 |
152 | 152 | run_once: true
|
153 | 153 | delegate_to: 127.0.0.1
|
154 | 154 |
|
|
0 commit comments