summaryrefslogtreecommitdiff
path: root/roles/install_babeld
diff options
context:
space:
mode:
authorNiklas Yann Wettengel <niyawe@niyawe.de>2021-07-26 18:02:03 +0200
committerNiklas Yann Wettengel <niyawe@niyawe.de>2021-07-26 18:02:03 +0200
commitf394fd81667a44e267e83d3c453101598a21c58c (patch)
treed7bbafdd26b9bebdb23e5546a2d0e97c9ffe360b /roles/install_babeld
parent0391e95103590bf6a5ff9c8d425420de2d44141b (diff)
new group wg
Diffstat (limited to 'roles/install_babeld')
-rw-r--r--roles/install_babeld/templates/babeld.conf.j27
1 files changed, 5 insertions, 2 deletions
diff --git a/roles/install_babeld/templates/babeld.conf.j2 b/roles/install_babeld/templates/babeld.conf.j2
index d714158..9dcaa87 100644
--- a/roles/install_babeld/templates/babeld.conf.j2
+++ b/roles/install_babeld/templates/babeld.conf.j2
@@ -5,7 +5,7 @@
ipv6-subtrees true
# You must provide at least one interface for babeld to operate on.
-{% if ('fastd' in group_names) %}
+{% if ('fastd' in group_names or 'wg' in group_names) %}
{% for peer in groups['uplink'] %}
interface bb{{ hostvars[peer]['wireguard_bb_name'] }}
{% endfor %}
@@ -14,6 +14,9 @@ interface bb{{ hostvars[peer]['wireguard_bb_name'] }}
{% for peer in groups['fastd'] %}
interface bb{{ hostvars[peer]['wireguard_bb_name'] }}
{% endfor %}
+{% for peer in groups['wg'] %}
+interface bb{{ hostvars[peer]['wireguard_bb_name'] }}
+{% endfor %}
{% for peer in groups['uplink'] | difference([inventory_hostname]) %}
interface bb{{ hostvars[peer]['wireguard_bb_name'] }}
{% endfor %}
@@ -63,7 +66,7 @@ redistribute ip 64:ff9b::/96 allow
redistribute ip fd62:44e1:da::/48 allow
redistribute local deny
-{% if ('fastd' in group_names) and preferred_uplink is defined %}
+{% if ('fastd' in group_names or 'wg' in group_names) and preferred_uplink is defined %}
{% for peer in groups['uplink'] %}
{% if not hostvars[peer]['wireguard_bb_name'] == preferred_uplink %}
in if bb{{ hostvars[peer]['wireguard_bb_name'] }} metric 64