rewrite bird

This commit is contained in:
ace
2021-10-27 00:33:38 +03:00
parent 0bdd5f6950
commit f0e516002f
8 changed files with 26 additions and 106 deletions

View File

@ -24,7 +24,7 @@ protocol kernel KERNEL6 {
protocol static {{ protocol_static.name }} {
ipv4;
{% for network in protocol_static['networks'][inventory_hostname] %}
route {{ network.ip }}/{{ network.mask_dash }} via "lo" { bgp_local_pref = {{ network.bgp_local_pref }}; };
route {{ network.ip }} via "{{ network.interface }}" { bgp_local_pref = {{ network.bgp_local_pref }}; };
{% endfor %}
}
{% endfor %}

View File

@ -1,15 +0,0 @@
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
{% for protocol_static in bird.bgp.static %}
{% for network in protocol_static['networks'][ansible_fqdn] %}
IPADDR{{ loop.index }}={{ network['ip'] }}
NETMASK{{ loop.index }}={{ network['mask'] }}
{% endfor %}
{% endfor %}
ONBOOT=yes
NAME=loopback