use dicts instead of lists to make merging work more nicely

master
Marek Isalski 6 years ago
parent ad775bffe9
commit 1056ddfdb9

@ -115,7 +115,7 @@ protocols {
{% endif %}{% endfor %} {% endif %}{% endfor %}
{% for area_name, area_data in pillar['protocols']['ospf']['area'].items() %} {% for area_name, area_data in pillar['protocols']['ospf']['area'].items() %}
area {{ area_name }} { area {{ area_name }} {
{% for network in area_data['networks'] %} {% for network, network_data in area_data['networks'].items() %}
network {{ network }} network {{ network }}
{% endfor %} {% endfor %}
} }
@ -129,11 +129,11 @@ protocols {
{% for area_name, area_data in pillar['protocols']['ospfv3']['area'].items() %} {% for area_name, area_data in pillar['protocols']['ospfv3']['area'].items() %}
area {{ area_name }} { area {{ area_name }} {
{% for range in area_data.get('range',[]) %} {% for range, range_data in area_data.get('range',{}).items() %}
range {{ range }} { range {{ range }} {
} }
{% endfor %} {% endfor %}
{% for interface in area_data.get('interface',[]) %} {% for interface, interface_data in area_data.get('interface',{}).items() %}
interface {{ interface }} interface {{ interface }}
{% endfor %} {% endfor %}
} }

Loading…
Cancel
Save