File tree Expand file tree Collapse file tree
tests/roles/dataplane_adoption/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 file : ospdo.yaml
2929 when : ospdo_src| bool
3030
31- - name : pre process netconfig_networks for mtu to be an integer
31+ - name : Pre process netconfig_networks for mtu to be an integer
3232 ansible.builtin.set_fact :
3333 netconfig_networks_converted : >-
34- {% set new_list = [] %}
35- {% for net in netconfig_networks %}
36- {% set _ = net.update({'mtu': net.mtu | int}) %}
37- {% set _ = new_list.append(net) %}
38- {% endfor %}
34+ {% set new_list = [] -%}
35+ {% for net in netconfig_networks -%}
36+ {% set mtu_value = net.mtu | default(None) -%}
37+ {% if mtu_value is not none -%}
38+ {% set _ = net.update({'mtu': mtu_value | int}) -%}
39+ {% endif -%}
40+ {% set _ = new_list.append(net) -%}
41+ {% endfor -%}
3942 {{ new_list }}
4043 when : configure_ipam | bool
4144
You can’t perform that action at this time.
0 commit comments