diff --git a/geant/gap_ansible/roles/base_config/tasks/merge_variables.yaml b/geant/gap_ansible/roles/base_config/tasks/merge_variables.yaml index 32d9a3f21857063022aa6d0b4e10956f803d2383..47b9b91b4dcdf50f8f6091100049b6b3abe44660 100644 --- a/geant/gap_ansible/roles/base_config/tasks/merge_variables.yaml +++ b/geant/gap_ansible/roles/base_config/tasks/merge_variables.yaml @@ -39,3 +39,7 @@ ansible.builtin.set_fact: cpm_filters: "{{ [cpm_filters, pe_cpm] | community.general.lists_mergeby('family', list_merge='append') }}" + - name: Merge P and PE prefix-lists + ansible.builtin.set_fact: + nokia_prefix_lists: "{{ [nokia_prefix_lists, nokia_pe_prefix_lists] | community.general.lists_mergeby('name', + list_merge='append') }}" diff --git a/geant/gap_ansible/roles/base_config/templates/routers/nokia/ip_prefix_list.j2 b/geant/gap_ansible/roles/base_config/templates/routers/nokia/ip_prefix_list.j2 index 71dbe2276c58fdf7f3b753f631aace92e9f4d7f7..2322d7702a03865a27417ae625902847bf3fc05b 100644 --- a/geant/gap_ansible/roles/base_config/templates/routers/nokia/ip_prefix_list.j2 +++ b/geant/gap_ansible/roles/base_config/templates/routers/nokia/ip_prefix_list.j2 @@ -34,14 +34,14 @@ <description>{{ ip_prefix.description }}</description> {% endif %} <apply-path> + {% for ap in ip_prefix.ipv4_apply_path %} <bgp-peers> - {% for ap in ip_prefix.ipv4_apply_path %} <criterion-index>{{ ap.idx }}</criterion-index> <group>{{ ap.bgp_group }}</group> <neighbor>{{ ap.bgp_neighbor }}</neighbor> <router-instance>{{ ap.router_instance }}</router-instance> - {% endfor %} </bgp-peers> + {% endfor %} </apply-path> </ip-prefix-list> {% endif %} @@ -52,14 +52,14 @@ <description>{{ ip_prefix.description }}</description> {% endif %} <apply-path> + {% for ap in ip_prefix.ipv6_apply_path %} <bgp-peers> - {% for ap in ip_prefix.ipv6_apply_path %} <criterion-index>{{ ap.idx }}</criterion-index> <group>{{ ap.bgp_group }}</group> <neighbor>{{ ap.bgp_neighbor }}</neighbor> <router-instance>{{ ap.router_instance }}</router-instance> - {% endfor %} </bgp-peers> + {% endfor %} </apply-path> </ipv6-prefix-list> {% endif %}