aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2023-10-08 19:31:37 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2023-10-08 19:31:37 +0200
commit9b72475b8b8e5627b678a356e232e82a6c61f8c5 (patch)
treeb073c39d947626ad268925ebeb4e22daf487b415 /ansible
parent18133a7854edec361f7699af0662027d527be540 (diff)
downloadinfra-9b72475b8b8e5627b678a356e232e82a6c61f8c5.tar.gz
infra-9b72475b8b8e5627b678a356e232e82a6c61f8c5.tar.bz2
infra-9b72475b8b8e5627b678a356e232e82a6c61f8c5.tar.xz
infra-9b72475b8b8e5627b678a356e232e82a6c61f8c5.zip
bgp
Diffstat (limited to 'ansible')
-rw-r--r--ansible/bgp/bgp.yml6
-rw-r--r--ansible/bgp/templates/bird.conf.j219
-rw-r--r--ansible/inventory9
3 files changed, 10 insertions, 24 deletions
diff --git a/ansible/bgp/bgp.yml b/ansible/bgp/bgp.yml
index 4c7787a..a3e6ce3 100644
--- a/ansible/bgp/bgp.yml
+++ b/ansible/bgp/bgp.yml
@@ -1,9 +1,5 @@
- hosts:
- - akili
- - arius
- - astyanax
- - hash
- - knot
+ - bgp
tasks:
- debug:
msg: "Hello World!"
diff --git a/ansible/bgp/templates/bird.conf.j2 b/ansible/bgp/templates/bird.conf.j2
index dfda44b..1d7ff19 100644
--- a/ansible/bgp/templates/bird.conf.j2
+++ b/ansible/bgp/templates/bird.conf.j2
@@ -7,24 +7,6 @@ define tnet_link = {{ tnet_link }};
log syslog all;
debug protocols all;
-{#
-
-filter tnet_import
-{
-{% if bgp_mynet|default(false) %}
- if net ~ mynet6 then reject "tnet_import reject mynet";
-{% endif %}
- accept "tnet_import accept other";
-}
-
-filter tnet_export
-{
-{% if bgp_mynet|default(false) %}
- if net ~ mynet6 then accept "tnet_export accept mynet";
-{% endif %}
- reject "tnet_export reject other";
-}
-#}
function is_tnet()
{
@@ -64,6 +46,7 @@ protocol bgp {{ peer.name }} {
password "trygvis";
ipv6 {
+ next hop self;
import filter {
if is_tnet() then accept "from {{ peer.name }}, import accept";
reject "from {{ peer.name }}, invalid tnet";
diff --git a/ansible/inventory b/ansible/inventory
index 71b25fa..46f8543 100644
--- a/ansible/inventory
+++ b/ansible/inventory
@@ -34,7 +34,7 @@ all:
babypi:
ansible_host: 192.168.10.159
astyanax:
- ansible_host: 2a01:79d:4698:96bc:d804:e55d:ee18:b7ba
+ ansible_host: astyanax.vpn.trygvis.io
sweetzpot-mobile:
ansible_host: 192.168.10.123
sweetzpot-macos:
@@ -172,4 +172,11 @@ all:
lhnpi:
lhnix:
+ bgp:
+ hosts:
+ akili:
+ arius:
+ astyanax:
+ hash:
+ knot:
# vim: set filetype=yaml: