diff --git a/roles/router/templates/keepalived-aurore.conf b/roles/router/templates/keepalived-aurore.conf index 9cbfc04..a260c36 100644 --- a/roles/router/templates/keepalived-aurore.conf +++ b/roles/router/templates/keepalived-aurore.conf @@ -112,6 +112,38 @@ vrrp_instance VI_ROUT_aurore_IPv4 { } } +vrrp_instance VI_ROUT_{{ apartment_block }}_IPv4_GTW { +{% if 'backup' in inventory_hostname %} + state MASTER + priority 150 +{% else %} + state BACKUP + priority 100 +{% endif %} + + # Interface used for VRRP communication. + interface ens19 + + # Shared by MASTER and BACKUP + virtual_router_id 5{{ apartment_block_id }} + + # Timeout in seconds before failover kicks in. + advert_int 2 + + # Used to authenticate VRRP communication between master and backup. + authentication { + auth_type PASS + auth_pass 48gbsassybbhaeFjoAjp + } + + smtp_alert + + virtual_routes { + # Gateway to routeur-aurore by default + src 45.66.111.140 to 0.0.0.0/0 via 10.129.0.254 dev ens18 + } +} + vrrp_instance VI_ROUT_aurore_IPv6 { {% if 'backup' in inventory_hostname %} state BACKUP @@ -174,3 +206,35 @@ vrrp_instance VI_ROUT_aurore_IPv6 { 2a09:6840:51::/64 via 2a09:6840:129::5:254 dev ens18 } } + +vrrp_instance VI_ROUT_{{ apartment_block }}_IPv6_GTW { +{% if 'backup' in inventory_hostname %} + state MASTER + priority 150 +{% else %} + state BACKUP + priority 100 +{% endif %} + + + # Interface used for VRRP communication. + interface ens19 + + # Shared by MASTER and BACKUP + virtual_router_id 7{{ apartment_block_id }} + + # Timeout in seconds before failover kicks in. + advert_int 2 + + # Used to authenticate VRRP communication between master and backup. + authentication { + auth_type PASS + auth_pass 48gbsassybbhaeFjoAjp + } + + smtp_alert + + virtual_routes { + src 2a09:6840:129::240 to ::/0 via 2a09:6840:129::254 dev ens18 + } +}