2020-11-19 01:52:27.697740 | fa163e2c-ca03-4fe4-5856-000000000acf | FATAL | Render network_config from template | compute-0 | error={"changed": false, "msg": "AnsibleError: Unexpected templating type error occurred on (---
network_config:
- type: interface
name: nic1
mtu: {{ ctlplane_mtu }}
dns_servers: {{ ctlplane_dns_nameservers }}
domain: {{ dns_search_domains }}
routes: {{ ctlplane_host_routes }}
use_dhcp: false
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }}
{% set nics_used = [1] %}
{% for network in role_networks and network not in networks_skip_config|default([]) %}
{% if network not in [\"External\", \"Tenant\"] %}
- type: interface
name: nic{{ loop.index +1 }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
use_dhcp: false
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{% elif network == 'Tenant' %}
- type: ovs_bridge
name: {{ 'br-' ~ role_networks_lower[network] }}
name: {{ neutron_physical_bridge_name }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
members:
- type: interface
name: nic{{loop.index + 1}}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
use_dhcp: false
primary: true
{% endif %}
{% set _ = nics_used.append(loop.index) %}
{% endfor %}
- type: ovs_bridge
name: {{ neutron_physical_bridge_name }}
mtu: {{ lookup('vars', role_networks_lower['External'] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
members:
- type: interface
name: nic{{nics_used[-1] + 1}}
mtu: {{ lookup('vars', role_networks_lower['External'] ~ '_mtu') }}
primary: true
): argument of type 'NoneType' is not iterable"}
in the inventory:
networks_skip_config: null
In the code:
{% for network in role_networks and network not in networks_skip_config|default([]) %}
networks_skip_config is defined as 'null', and thus does not default to [].
Fix proposed to branch: master /review. opendev. org/763296
Review: https:/