network/roles/firewall/tasks/frr.yml

49 lines
902 B
YAML
Raw Normal View History

2023-12-18 10:22:14 +00:00
- name: Enable sysctl service
service:
name: sysctl
enabled: yes
runlevel: boot
state: started
- name: Enable community package repo
lineinfile:
path: /etc/apk/repositories
regexp: '^# *(http.*/v[^/]*/community)'
line: '\1'
backrefs: yes
- name: Install FRR
package:
name: frr,frr-pythontools
state: latest
- name: Set datacenter defaults
lineinfile:
path: /etc/frr/daemons
regexp: '^frr_profile='
line: 'frr_profile="datacenter"'
notify: restart frr
- name: Enable BGP and BFD
lineinfile:
path: /etc/frr/daemons
regexp: "^{{ item }}="
line: "{{ item }}=yes"
loop:
- bfdd
- bgpd
notify: restart frr
- name: Enable FRR service
service:
name: frr
enabled: yes
state: started
- name: Copy FRR config
template:
dest: /etc/frr/frr.conf
src: frr.conf.j2
mode: 0644
notify: reload frr