Browse Source

Merge "Map nicX abstraction to phys interface name"

changes/01/770301/10
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
fb8baf28d9
2 changed files with 22 additions and 2 deletions
  1. +21
    -1
      tripleo_ansible/roles/tripleo_frr/tasks/main.yml
  2. +1
    -1
      tripleo_ansible/roles/tripleo_frr/templates/frr.conf.j2

+ 21
- 1
tripleo_ansible/roles/tripleo_frr/tasks/main.yml View File

@ -1,5 +1,5 @@
---
# Copyright 2020 Red Hat, Inc.
# Copyright 2021 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -23,6 +23,26 @@
selevel: s0
setype: container_file_t
- name: identify the real interfaces via os-net-config
shell: os-net-config -i
register: os_net_config_result
- name: os-net-config from json
set_fact:
iface_map: "{{ os_net_config_result.stdout }}"
- name: FRR uplink interfaces
block:
- name: construct FRR uplink interfaces from os-net-config mappings
set_fact:
tripleo_frr_bgp_uplinks_mapped: "{{ tripleo_frr_bgp_uplinks | map('extract', iface_map) | list }}"
rescue:
- name: failed to construct FRR uplink interfaces
ansible.builtin.fail:
msg: |
Failed to map at least one interface from {{ tripleo_frr_bgp_uplinks }} to {{ iface_map }}.
Please check value of Ansible variable tripleo_frr_bgp_uplinks.
- name: configure FRR
become: true
ansible.builtin.template:


+ 1
- 1
tripleo_ansible/roles/tripleo_frr/templates/frr.conf.j2 View File

@ -15,7 +15,7 @@ router bgp {{ tripleo_frr_bgp_asn }}
{% if tripleo_frr_bfd %}
neighbor uplink bfd
{% endif %}
{% for iface in tripleo_frr_bgp_uplinks %}
{% for iface in tripleo_frr_bgp_uplinks_mapped %}
neighbor {{ iface }} interface peer-group uplink
{% endfor %}


Loading…
Cancel
Save