|
182 | 182 | networks: |
183 | 183 | {{ _lnet_data.name | replace('cifmw_', '') }}: |
184 | 184 | {% if _lnet_data.ranges[0].start_v4 is defined and _lnet_data.ranges[0].start_v4 %} |
185 | | - {% set net_4 = _lnet_data.ranges[0].start_v4 | ansible.utils.ipsubnet(_lnet_data.ranges[0].prefix_length_v4) %} |
186 | | - network-v4: {{ net_4}} |
| 185 | + {%- set net_4 = _lnet_data.ranges[0].start_v4 | ansible.utils.ipsubnet(_lnet_data.ranges[0].prefix_length_v4) %} |
| 186 | + network-v4: '{{ net_4 }}' |
187 | 187 | {% endif %} |
188 | 188 | {% if _lnet_data.ranges[0].start_v6 is defined and _lnet_data.ranges[0].start_v6 %} |
189 | | - {% set net_6 = _lnet_data.ranges[0].start_v6 | ansible.utils.ipsubnet(_lnet_data.ranges[0].prefix_length_v6) %} |
190 | | - network-v6: {{ net_6 }} |
| 189 | + {%- set net_6 = _lnet_data.ranges[0].start_v6 | ansible.utils.ipsubnet(_lnet_data.ranges[0].prefix_length_v6) %} |
| 190 | + network-v6: '{{ net_6 }}' |
191 | 191 | {% endif %} |
192 | 192 | group-templates: |
193 | 193 | {% for group in _cifmw_libvirt_manager_layout.vms.keys() if group != 'controller' and |
|
202 | 202 | {% if cifmw_networking_definition['group-templates'][_gr ~ 's']['network-template'] is undefined %} |
203 | 203 | {% if net_4 is defined %} |
204 | 204 | range-v4: |
205 | | - start: {{ net_4 | ansible.utils.nthhost(ns.ip_start | int ) }} |
| 205 | + start: '{{ net_4 | ansible.utils.nthhost(ns.ip_start | int ) }}' |
206 | 206 | length: {{ _cifmw_libvirt_manager_layout.vms[group].amount | default(1) }} |
207 | 207 | {% endif %} |
208 | 208 | {% if net_6 is defined %} |
209 | 209 | range-v6: |
210 | | - start: {{ net_6 | ansible.utils.nthhost(ns.ip_start | int) }} |
| 210 | + start: '{{ net_6 | ansible.utils.nthhost(ns.ip_start | int) }}' |
211 | 211 | length: {{ _cifmw_libvirt_manager_layout.vms[group].amount | default(1) }} |
212 | 212 | {% endif %} |
213 | 213 | {% set ns.ip_start = ns.ip_start|int + (_cifmw_libvirt_manager_layout.vms[group].amount | default(1) | int ) + 1 %} |
|
220 | 220 | {{ cifmw_libvirt_manager_pub_net }}: |
221 | 221 | {% if net_4 is defined and cifmw_networking_definition['group-templates']['baremetals']['network-template'] is undefined %} |
222 | 222 | range-v4: |
223 | | - start: {{ net_4 | ansible.utils.nthhost(ns.ip_start) }} |
| 223 | + start: '{{ net_4 | ansible.utils.nthhost(ns.ip_start) }}' |
224 | 224 | length: {{ cifmw_baremetal_hosts | length }} |
225 | 225 | {% endif %} |
226 | 226 | {% if net_6 is defined and cifmw_networking_definition['group-templates']['baremetals']['network-template'] is undefined %} |
227 | 227 | range-v6: |
228 | | - start: {{ net_6 | ansible.utils.nthhost(ns.ip_start) }} |
| 228 | + start: '{{ net_6 | ansible.utils.nthhost(ns.ip_start) }}' |
229 | 229 | length: {{ cifmw_baremetal_hosts | length }} |
230 | 230 | {% endif %} |
231 | 231 | {% endif %} |
|
235 | 235 | networks: |
236 | 236 | {{ _lnet_data.name | replace('cifmw_', '') }}: |
237 | 237 | {% if net_4 is defined %} |
238 | | - ip-v4: "{{ net_4 | ansible.utils.nthhost(9) }}" |
| 238 | + ip-v4: '{{ net_4 | ansible.utils.nthhost(9) }}' |
239 | 239 | {% endif %} |
240 | 240 | {% if net_6 is defined %} |
241 | | - ip-v6: "{{ net_6 | ansible.utils.nthhost(9) }}" |
| 241 | + ip-v6: '{{ net_6 | ansible.utils.nthhost(9) }}' |
242 | 242 | {% endif %} |
243 | 243 | {% endif %} |
244 | 244 | block: |
|
0 commit comments