Преглед на файлове

The bird config for the internal distribution of routes should now also generate everything based on available hosts

Till Klocke преди 10 години
родител
ревизия
ab965d92e0
променени са 2 файла, в които са добавени 15 реда и са изтрити 8 реда
  1. 6 4
      roles/internal/ffdo.mesh-interfaces/templates/bird.conf.j2
  2. 9 4
      roles/internal/ffdo.mesh-interfaces/templates/bird6.conf.j2

+ 6 - 4
roles/internal/ffdo.mesh-interfaces/templates/bird.conf.j2

@@ -2,10 +2,12 @@
 # This file is managed by ansible. Do not edit by hand!
 #
 
-{% for meshlink in supernode_mesh_backbones%}
-protocol bgp {{meshlink.name}} from ibgp {
-        source address {{supernode_mesh_ipv4|ipaddr('address')}};
-        neighbor {{meshlink.mesh_ip}} as {{supernode_as}};
+{% for host in hostvars %}
+{% if host['ansible_fqdn'] != ansible_fqdn %}
+protocol bgp {{host['ansible_hostname']}} from ibgp {
+        source address {{mesh_ipv4|ipaddr('address')}};
+        neighbor {{host.mesh_ipv4}} as {{supernode_as}};
         default bgp_med 4;
 };
+{% endif %}
 {% endfor %}

+ 9 - 4
roles/internal/ffdo.mesh-interfaces/templates/bird6.conf.j2

@@ -1,7 +1,12 @@
-{% for meshlink in supernode_mesh_backbones %}
-protocol bgp {{meshlink.name}} from ibgp {
-        neighbor {{meshlink.address_v6}} as {{supernode_as}};
+#
+# This file is managed by ansible. Do not edit by hand!
+#
+
+{% for host in hostvars %}
+{% if host['ansible_fqdn'] != ansible_fqdn %}
+protocol bgp {{host['ansible_hostname']}} from ibgp {
+        neighbor {{host.mesh_ipv6}} as {{supernode_as}};
         default bgp_med 4;
 }
-
+{% endif %}
 {% endfor %}