summaryrefslogtreecommitdiff
path: root/roles/install_babeld
diff options
context:
space:
mode:
Diffstat (limited to 'roles/install_babeld')
-rw-r--r--roles/install_babeld/tasks/main.yml6
-rw-r--r--roles/install_babeld/templates/babeld.conf.j230
2 files changed, 19 insertions, 17 deletions
diff --git a/roles/install_babeld/tasks/main.yml b/roles/install_babeld/tasks/main.yml
index f3cd693..a8299da 100644
--- a/roles/install_babeld/tasks/main.yml
+++ b/roles/install_babeld/tasks/main.yml
@@ -1,10 +1,8 @@
---
- name: install fastd
- become: yes
- become_user: '{{ aur_user }}'
- aur:
+ pacman:
name: babeld
- tool: yaourt
+ state: present
- name: babeld.conf
template:
diff --git a/roles/install_babeld/templates/babeld.conf.j2 b/roles/install_babeld/templates/babeld.conf.j2
index d654df8..a675fd6 100644
--- a/roles/install_babeld/templates/babeld.conf.j2
+++ b/roles/install_babeld/templates/babeld.conf.j2
@@ -5,10 +5,16 @@
ipv6-subtrees true
# You must provide at least one interface for babeld to operate on.
-{% for peer in wireguard_bb_peers %}
-interface bb{{ peer.name }}
+{% if 'ffrl_uplink' in group_names %}
+{% for peer in groups['fastd'] %}
+interface bb{{ hostvars[peer]['wireguard_bb_name'] }}
{% endfor %}
-#interface wlan0
+{% endif %}
+{% if 'fastd' in group_names %}
+{% for peer in groups['ffrl_uplink'] %}
+interface bb{{ hostvars[peer]['wireguard_bb_name'] }}
+{% endfor %}
+{% endif %}
# Global options you might want to set. There are many more, see the man page.
#debug 1
@@ -44,16 +50,14 @@ import-table 42
#in ip 2001:db8:cafe:cafe::/64 allow
#in deny
-redistribute metric 128
+{% if 'ffrl_uplink' in group_names %}
+{% for peer in ffrl_peers %}
+redistribute if {{ peer.name }} metric 128
+{% endfor %}
+{% endif %}
# Only redistribute addresses from a given prefix, to avoid redistributing
# all local addresses
-redistribute ip 10.222.0.0/16 local allow
-redistribute ip 2001:470:cd45:FF00::/56 local allow
+redistribute ip 10.222.0.0/16 allow
+redistribute ip 2001:470:cd45:FF00::/56 allow
+redistribute ip 2a03:2260:1016::/48 allow
redistribute local deny
-
-# Redistribute a default route obtained otherwise (here, through DHCP or
-# configured statically).
-# Note that babeld ignores kernel routes with proto 3 (boot) by default.
-#redistribute proto 3 ip 0.0.0.0/0 eq 0 metric 50
-#redistribute proto 3 ip ::/0 eq 0 metric 50
-