Browse Source

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

Till Klocke 10 năm trước cách đây
mục cha
commit
ab965d92e0

+ 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 %}