From 1056ddfdb9ef3718ca9bc845c3a58a5d9fcac584 Mon Sep 17 00:00:00 2001 From: Marek Isalski Date: Sun, 12 May 2019 10:15:51 +0100 Subject: [PATCH] use dicts instead of lists to make merging work more nicely --- vyos.conf.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vyos.conf.j2 b/vyos.conf.j2 index 566bd29..3ed84b9 100644 --- a/vyos.conf.j2 +++ b/vyos.conf.j2 @@ -115,7 +115,7 @@ protocols { {% endif %}{% endfor %} {% for area_name, area_data in pillar['protocols']['ospf']['area'].items() %} area {{ area_name }} { - {% for network in area_data['networks'] %} + {% for network, network_data in area_data['networks'].items() %} network {{ network }} {% endfor %} } @@ -129,11 +129,11 @@ protocols { {% for area_name, area_data in pillar['protocols']['ospfv3']['area'].items() %} area {{ area_name }} { - {% for range in area_data.get('range',[]) %} + {% for range, range_data in area_data.get('range',{}).items() %} range {{ range }} { } {% endfor %} - {% for interface in area_data.get('interface',[]) %} + {% for interface, interface_data in area_data.get('interface',{}).items() %} interface {{ interface }} {% endfor %} }