diff --git a/roles/backbone_babel/tasks/routing_bird.yml b/roles/backbone_babel/tasks/routing_bird.yml index d72bd338ae0d33868b4062bea909630d11cf028e..8d558c0cac35875336b15098985156efca2f0fa2 100644 --- a/roles/backbone_babel/tasks/routing_bird.yml +++ b/roles/backbone_babel/tasks/routing_bird.yml @@ -1,8 +1,21 @@ --- +- name: Setup bird repos on bookworm + when: ansible_facts['distribution_major_version'] == "12" + block: + - name: Deploy bird apt repo key + ansible.builtin.copy: + src: bird-cznic-labs-pkg-apt-key.gpg + dest: /usr/share/keyrings/cznic-labs-pkg.gpg + - name: Deploy bird cz.nic apt repo config + ansible.builtin.copy: + src: bird-cznic-labs-pkg-apt.list + dest: /etc/apt/sources.list.d/cznic-labs-bird2.list + - name: Install bird2 ansible.builtin.apt: name: bird2 state: present + update_cache: yes - name: Mask babeld to avoid conflicts with bird ansible.builtin.systemd_service: diff --git a/roles/backbone_babel/templates/bird-backbone-babel.conf.j2 b/roles/backbone_babel/templates/bird-backbone-babel.conf.j2 index bca852e5262243400d89b4d8008fea41ae268d3e..153627c62527c538836014ac3fc3976dfd290941 100644 --- a/roles/backbone_babel/templates/bird-backbone-babel.conf.j2 +++ b/roles/backbone_babel/templates/bird-backbone-babel.conf.j2 @@ -1,4 +1,18 @@ # ANSIBLE managed +protocol static bb_babel_static_v6 { + ipv6; +{% for ip in bb_babel_loopback_ipv6 %} + route {{ ip }}/128 unreachable; +{% endfor %} +}; + +protocol static bb_babel_static_v4 { + ipv4; +{% for ip in bb_babel_loopback_ipv4 %} + route {{ ip }}/32 unreachable; +{% endfor %} +}; + filter import_backbone_babel { {% for network in bb_babel_networks|ansible.utils.ipv6 %} if net.type = NET_IP6 && net ~ [{{ network }}+] then { @@ -29,7 +43,7 @@ filter export_backbone_babel { reject; }; -protocol babel backbone_babel { +protocol babel bb_babel { {% for interface in interfaces %} interface "{{ interface }}" { type wired;