Switch ipv6_edge_router to quagga #8
4 changed files with 33 additions and 6 deletions
|
@ -1,10 +1,5 @@
|
|||
|
||||
{% if 'backup' in inventory_hostname %}
|
||||
bgpd=no
|
||||
{% else %}
|
||||
zebra=yes
|
||||
bgpd=yes
|
||||
{% endif %}
|
||||
zebra=yes
|
||||
ospfd=no
|
||||
ospf6d=no
|
||||
ripd=no
|
||||
|
|
|
@ -75,6 +75,13 @@
|
|||
notify: restart keepalived
|
||||
when: "'routeur-aurore' not in ansible_hostname"
|
||||
|
||||
- name: install notify-quagga on routeur-aurore*
|
||||
template:
|
||||
src: notify-quagga.j2
|
||||
dest: /usr/local/sbin/notify-quagga
|
||||
mode: u=rx,g=r,o=r
|
||||
when: "'routeur-aurore' in ansible_hostname"
|
||||
|
||||
- name: configure keepalived for routeur-aurore*
|
||||
template:
|
||||
src: keepalived-aurore.conf
|
||||
|
|
|
@ -127,5 +127,9 @@ vrrp_instance VI_ROUT_aurore_IPv6 {
|
|||
2a09:6840:50::/64 via 2a09:6840:129::5:254 dev ens18
|
||||
2a09:6840:51::/64 via 2a09:6840:129::5:254 dev ens18
|
||||
}
|
||||
|
||||
notify_master "/usr/local/sbin/notify-quagga master"
|
||||
notify_backup "/usr/local/sbin/notify-quagga backup"
|
||||
notify_fault "/usr/local/sbin/notify-quagga fault"
|
||||
}
|
||||
|
||||
|
|
21
roles/router/templates/notify-quagga.j2
Normal file
21
roles/router/templates/notify-quagga.j2
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
if [[ $# = 0 ]]; then
|
||||
echo "Invalid number of arguments" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
master)
|
||||
systemctl start zebra.service
|
||||
systemctl start bgpd.service
|
||||
;;
|
||||
backup | fault)
|
||||
systemctl stop zebra.service
|
||||
systemctl stop bgpd.service
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument" >&2
|
||||
exit 1
|
||||
esac
|
Loading…
Reference in a new issue