From 91220c523849a0dbc60ac3f1a8cc7501bb7f4791 Mon Sep 17 00:00:00 2001
From: shirenn <shirenn@crans.org>
Date: Sat, 10 Jul 2021 23:59:50 +0200
Subject: [PATCH] [routeurs] lets fix everything

---
 .../keepalived.yml                            |  5 ++--
 .../routeur-daniel.adm.crans.org/vars.yml     |  7 ++---
 host_vars/routeur-jack.adm.crans.org/bird.yml | 28 +++++++++++++++++++
 .../routeur-jack.adm.crans.org/keepalived.yml |  4 ++-
 host_vars/routeur-jack.adm.crans.org/vars.yml |  7 ++---
 .../routeur-sam.adm.crans.org/keepalived.yml  |  1 +
 plays/routeurs.yml                            |  1 +
 7 files changed, 42 insertions(+), 11 deletions(-)
 create mode 100644 host_vars/routeur-jack.adm.crans.org/bird.yml

diff --git a/host_vars/routeur-daniel.adm.crans.org/keepalived.yml b/host_vars/routeur-daniel.adm.crans.org/keepalived.yml
index 54281f45..783f66ed 100644
--- a/host_vars/routeur-daniel.adm.crans.org/keepalived.yml
+++ b/host_vars/routeur-daniel.adm.crans.org/keepalived.yml
@@ -2,8 +2,8 @@
 loc_keepalived:
   instances:
     - name: VI_ALL
-      state: MASTER
-      priority: 150
+      state: BACKUP
+      priority: 100
 
 loc_service_keepalived:
   git:
@@ -15,3 +15,4 @@ loc_service_keepalived:
         - isc-dhcp-server
         - radvd
         - bird
+        - bird6
diff --git a/host_vars/routeur-daniel.adm.crans.org/vars.yml b/host_vars/routeur-daniel.adm.crans.org/vars.yml
index 8374bc8b..dabb4748 100644
--- a/host_vars/routeur-daniel.adm.crans.org/vars.yml
+++ b/host_vars/routeur-daniel.adm.crans.org/vars.yml
@@ -4,7 +4,6 @@ interfaces:
   via: ens19
   aurore: ens20
   renater: ens21
-  interco: ens22
-  srv: ens23
-  srv_nat: ens1
-  adh: enp1s2
+  srv: ens22
+  srv_nat: ens23
+  adh: ens1
diff --git a/host_vars/routeur-jack.adm.crans.org/bird.yml b/host_vars/routeur-jack.adm.crans.org/bird.yml
new file mode 100644
index 00000000..e4cce20e
--- /dev/null
+++ b/host_vars/routeur-jack.adm.crans.org/bird.yml
@@ -0,0 +1,28 @@
+---
+loc_bird:
+  ipv4:
+    id: 185.230.79.253
+    binds:
+      - 185.230.79.253
+    statics:
+      - 185.230.78.0/23
+    bgps:
+      - name: aurore
+        allow_local_as: 1
+        local_as: 204515
+        remote:
+          as: 43619
+          address: 185.230.79.254
+  ipv6:
+    id: 185.230.79.253
+    binds:
+      - 2a0c:700:28::1
+    statics:
+      - 2a0c:700::/36
+    bgps:
+      - name: aurore
+        allow_local_as: 1
+        local_as: 204515
+        remote:
+          as: 43619
+          address: 2a0c:700:28::2
diff --git a/host_vars/routeur-jack.adm.crans.org/keepalived.yml b/host_vars/routeur-jack.adm.crans.org/keepalived.yml
index 62035449..654315aa 100644
--- a/host_vars/routeur-jack.adm.crans.org/keepalived.yml
+++ b/host_vars/routeur-jack.adm.crans.org/keepalived.yml
@@ -3,7 +3,7 @@ loc_keepalived:
   instances:
     - name: VI_ALL
       state: BACKUP
-      priority: 100
+      priority: 50
 
 loc_service_keepalived:
   git:
@@ -14,3 +14,5 @@ loc_service_keepalived:
       VI_ALL:
         - isc-dhcp-server
         - radvd
+        - bird
+        - bird6
diff --git a/host_vars/routeur-jack.adm.crans.org/vars.yml b/host_vars/routeur-jack.adm.crans.org/vars.yml
index 14ee1f30..dabb4748 100644
--- a/host_vars/routeur-jack.adm.crans.org/vars.yml
+++ b/host_vars/routeur-jack.adm.crans.org/vars.yml
@@ -4,7 +4,6 @@ interfaces:
   via: ens19
   aurore: ens20
   renater: ens21
-  interco: ens22
-  srv: ens23
-  srv_nat: ens1
-  adh: ens2
+  srv: ens22
+  srv_nat: ens23
+  adh: ens1
diff --git a/host_vars/routeur-sam.adm.crans.org/keepalived.yml b/host_vars/routeur-sam.adm.crans.org/keepalived.yml
index 54281f45..917ba07f 100644
--- a/host_vars/routeur-sam.adm.crans.org/keepalived.yml
+++ b/host_vars/routeur-sam.adm.crans.org/keepalived.yml
@@ -15,3 +15,4 @@ loc_service_keepalived:
         - isc-dhcp-server
         - radvd
         - bird
+        - bird6
diff --git a/plays/routeurs.yml b/plays/routeurs.yml
index f9e42659..fc141cc4 100755
--- a/plays/routeurs.yml
+++ b/plays/routeurs.yml
@@ -6,4 +6,5 @@
 - import_playbook: firewall.yml
 - import_playbook: dns-recursive.yml
 - import_playbook: prefix-delegation.yml
+- import_playbook: radvd.yml
 - import_playbook: keepalived.yml
-- 
GitLab