summaryrefslogtreecommitdiff
path: root/roles/uvok_bird/templates
diff options
context:
space:
mode:
authoruvok cheetah2024-04-21 15:50:35 +0200
committeruvok cheetah2024-04-21 15:50:35 +0200
commit2b9a71e8ecb41cc8e9b73735837f07c9b1351ff7 (patch)
tree84ff56a440e31ce33bb8ea214ab79391660a4b44 /roles/uvok_bird/templates
parent293ddf3a4bf78d72fea4b8196e3bbc2d81b3f12e (diff)
Changed to bird tole
- rename prefixes to clear_prefixes - add router id - add config files - add handler "change"
Diffstat (limited to 'roles/uvok_bird/templates')
-rw-r--r--roles/uvok_bird/templates/bird.conf.j216
-rw-r--r--roles/uvok_bird/templates/clearnet.conf.j25
-rw-r--r--roles/uvok_bird/templates/defines.conf.j24
3 files changed, 24 insertions, 1 deletions
diff --git a/roles/uvok_bird/templates/bird.conf.j2 b/roles/uvok_bird/templates/bird.conf.j2
new file mode 100644
index 0000000..82452a0
--- /dev/null
+++ b/roles/uvok_bird/templates/bird.conf.j2
@@ -0,0 +1,16 @@
+# {{ ansible_managed }}
+
+include "/etc/bird/logging.conf";
+
+include "/etc/bird/defines.conf";
+router id OWNIP;
+
+include "/etc/bird/common.conf";
+
+{% if uvok_bird_opts.dn42 %}
+include "/etc/bird/dn42.conf";
+{% endif %}
+
+{% if uvok_bird_opts.clearnet %}
+include "/etc/bird/clearnet.conf";
+{% endif %}
diff --git a/roles/uvok_bird/templates/clearnet.conf.j2 b/roles/uvok_bird/templates/clearnet.conf.j2
index 420a8da..1ced3a4 100644
--- a/roles/uvok_bird/templates/clearnet.conf.j2
+++ b/roles/uvok_bird/templates/clearnet.conf.j2
@@ -1,5 +1,8 @@
# {{ ansible_managed }}
+include "/etc/bird/clear_defines.conf";
+include "/etc/bird/clear_functions.conf";
+
define CLEARNET_PREFIP = {{ uvok_bird_opts.preferred_ip }};
# trs=transit
@@ -145,7 +148,7 @@ filter myas_f_rc
};
protocol static myprefix {
-{% for prefix in uvok_bird_opts.prefixes %}
+{% for prefix in uvok_bird_opts.clear_prefixes %}
route {{ prefix }} reject;
{% endfor %};
diff --git a/roles/uvok_bird/templates/defines.conf.j2 b/roles/uvok_bird/templates/defines.conf.j2
new file mode 100644
index 0000000..8a8d597
--- /dev/null
+++ b/roles/uvok_bird/templates/defines.conf.j2
@@ -0,0 +1,4 @@
+# {{ ansible_managed }}
+
+# both clear and DN42
+define OWNIP = {{ uvok_bird_opts.router_id }};