pvc-ansible/roles/pvc/tasks/frr/main.yml

38 lines
726 B
YAML
Raw Permalink Normal View History

2023-09-01 15:42:19 -04:00
---
- name: install frr packages
apt:
name:
- frr
state: latest
2023-09-01 15:42:30 -04:00
register: apt_res
retries: 5
until: apt_res is success
2023-09-01 15:42:19 -04:00
2023-12-10 00:24:19 -05:00
- name: install Prometheus frr exporter if enabled
apt:
name:
- prometheus-frr-exporter
register: apt_res
retries: 5
until: apt_res is success
when: enable_prometheus_exporters is defined and enable_prometheus_exporters and debian_version|int >= 12
2023-12-10 00:24:19 -05:00
2023-09-01 15:42:19 -04:00
- name: install frr configuration
template:
src: frr/{{ item }}.j2
dest: /etc/frr/{{ item }}
with_items:
- daemons
- frr.conf
notify: restart frr
ignore_errors: true
- name: disable services
service:
name: "{{ item }}"
enabled: no
with_items:
- frr
2023-09-01 15:42:19 -04:00
- meta: flush_handlers