Skip to content
Snippets Groups Projects
Unverified Commit 8c9e5596 authored by Nico's avatar Nico
Browse files

add support for peering directly over interfaces

parent bce8069d
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,17 @@
ansible.builtin.include_tasks:
file: loopback.yml
- name: Get all lines in local machine
- name: Create interface network config for peering interfaces
ansible.builtin.template:
src: peer.network.j2
dest: "/etc/systemd/network/bb-babel-{{ interface }}.network"
notify:
- reload systemd-networkd
loop: "{{ bb_babel_peer_interfaces|default([]) }}"
loop_control:
loop_var: interface
- name: Get all wireguard lines in local machine
ansible.builtin.set_fact:
local_lines: "{{ bb_babel_wg_lines|dict2items|json_query(_query)|items2dict }}"
vars:
......@@ -61,4 +71,4 @@
file: babeld.yml
vars:
# list remote line names for connections we are on either side (line_a or line_b) of
interfaces: "{{ bb_babel_wg_connections|selectattr('line_a', 'in', local_lines)|map(attribute='line_b') + bb_babel_wg_connections|selectattr('line_b', 'in', local_lines)|map(attribute='line_a') }}"
interfaces: "{{ bb_babel_wg_connections|selectattr('line_a', 'in', local_lines)|map(attribute='line_b') + bb_babel_wg_connections|selectattr('line_b', 'in', local_lines)|map(attribute='line_a') + bb_babel_peer_interfaces|default([]) }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment