diff --git a/group_vars/keepalived.yml b/group_vars/keepalived.yml index 39f72b8c349c814c58d6bf70a12697dbcae92f10..8a51d7e8590c6c1e8a5d8866fb99a53711083db7 100644 --- a/group_vars/keepalived.yml +++ b/group_vars/keepalived.yml @@ -1,8 +1,9 @@ --- glob_keepalived: mail_source: keepalived@crans.org - mail_destination: shirenn@crans.org + mail_destination: root@crans.org smtp_server: smtp.adm.crans.org + routeur_id: "{{ ansible_hostname }}" pool: VI_ALL: password: "{{ vault.keepalived.password }}" @@ -11,14 +12,18 @@ glob_keepalived: notify: /var/local/services/keepalived/keepalived.py zones: - vlan: srv - ipv4: 185.230.79.61/26 - ipv6: 2a0c:700:2::ff:fe01:9902/64 + ipv4: 185.230.79.62/26 + ipv6: 2a0c:700:2::ff:fe00:9902/64 - vlan: srv_nat - ipv4: 172.16.3.199/24 - ipv6: 2a0c:700:3::ff:fe01:9903/64 + ipv4: 172.16.3.99/24 + ipv6: 2a0c:700:3::ff:fe00:9903/64 - vlan: adh - ipv4: 185.230.78.199/24 - ipv6: 2a0c:700:12::ff:fe01:9912/48 + ipv4: 185.230.78.99/24 + ipv6: 2a0c:700:12::ff:fe00:9912/48 + - vlan: aurore + ipv4: 185.230.79.253/29 + brd: no + ipv6: 2a0c:700:28::1/64 glob_service_keepalived: name: keepalived diff --git a/host_vars/routeur-daniel.adm.crans.org/keepalived.yml b/host_vars/routeur-daniel.adm.crans.org/keepalived.yml index 72646b654180d8b75e60b3e74c7bc7a154d72694..54281f45338312a6295a3f2dc55e7eb00f3d6778 100644 --- a/host_vars/routeur-daniel.adm.crans.org/keepalived.yml +++ b/host_vars/routeur-daniel.adm.crans.org/keepalived.yml @@ -14,3 +14,4 @@ loc_service_keepalived: VI_ALL: - isc-dhcp-server - radvd + - bird diff --git a/host_vars/routeur-sam.adm.crans.org/keepalived.yml b/host_vars/routeur-sam.adm.crans.org/keepalived.yml new file mode 100644 index 0000000000000000000000000000000000000000..54281f45338312a6295a3f2dc55e7eb00f3d6778 --- /dev/null +++ b/host_vars/routeur-sam.adm.crans.org/keepalived.yml @@ -0,0 +1,17 @@ +--- +loc_keepalived: + instances: + - name: VI_ALL + state: MASTER + priority: 150 + +loc_service_keepalived: + git: + remote: https://gitlab.adm.crans.org/nounous/keepalived.git + version: master + config: + services: + VI_ALL: + - isc-dhcp-server + - radvd + - bird diff --git a/roles/keepalived/templates/keepalived/keepalived.conf.j2 b/roles/keepalived/templates/keepalived/keepalived.conf.j2 index f8645e47c182583d5a7ac5eb272f7fe04b65b317..5bde7f18276060529593994156f065f4e0f57e8a 100644 --- a/roles/keepalived/templates/keepalived/keepalived.conf.j2 +++ b/roles/keepalived/templates/keepalived/keepalived.conf.j2 @@ -4,6 +4,7 @@ global_defs { notification_email { {{ keepalived.mail_destination }} } notification_email_from {{ keepalived.mail_source }} smtp_server {{ keepalived.smtp_server }} + router_id {{ keepalived.routeur_id }} } {% for instance in keepalived.instances %} @@ -15,10 +16,6 @@ vrrp_instance {{ instance.name }} { interface {{ interfaces.adm }} virtual_router_id {{ keepalived.pool[instance.name].id }} advert_int 2 - authentication { - auth_type PASS - auth_pass {{ keepalived.pool[instance.name].password }} - } {% if keepalived.pool[instance.name].notify is defined %} notify {{ keepalived.pool[instance.name].notify }} @@ -44,10 +41,6 @@ vrrp_instance {{ instance.name }}6 { interface {{ interfaces.adm }} virtual_router_id {{ keepalived.pool[instance.name].id }} advert_int 2 - authentication { - auth_type PASS - auth_pass {{ keepalived.pool[instance.name].password }} - } virtual_ipaddress { {% for zone in keepalived.pool[instance.name].zones %}