2020-04-22 11:59:41 +02:00
|
|
|
---
|
|
|
|
- name: Deploy bgp check script
|
|
|
|
template:
|
|
|
|
src: bgpd-check-peers.sh.j2
|
|
|
|
dest: /usr/share/scripts/bgpd-check-peers.sh
|
|
|
|
when: group_names | select('search','bgp') | list | count > 0
|
|
|
|
tags:
|
2020-06-01 11:37:15 +02:00
|
|
|
- bgp
|
2020-04-22 11:59:41 +02:00
|
|
|
|
|
|
|
- name: Cron job for bgp check script is installed
|
|
|
|
cron:
|
|
|
|
name: bgp check
|
|
|
|
job: "/bin/sh /usr/share/scripts/bgpd-check-peers.sh"
|
|
|
|
when: group_names | select('search','bgp') | list | count > 0
|
|
|
|
tags:
|
|
|
|
- bgp
|
|
|
|
|
2020-06-01 11:37:15 +02:00
|
|
|
- name: Create bgp log directory
|
2020-04-22 11:59:41 +02:00
|
|
|
file:
|
|
|
|
path: /var/log/bgp
|
|
|
|
state: directory
|
|
|
|
when: group_names | select('search','bgp') | list | count > 0
|
|
|
|
tags:
|
2020-06-01 11:37:15 +02:00
|
|
|
- bgp
|
2020-04-22 11:59:41 +02:00
|
|
|
|
2020-09-24 16:11:49 +02:00
|
|
|
- name: daily best routes cron job is installed
|
2020-04-22 11:59:41 +02:00
|
|
|
cron:
|
|
|
|
name: bgp best routes
|
|
|
|
minute: 0
|
|
|
|
hour: 4
|
2020-06-04 18:51:53 +02:00
|
|
|
job: >
|
|
|
|
/usr/sbin/bgpctl show rib selected
|
2020-09-24 16:11:49 +02:00
|
|
|
> /var/log/bgp/rib-selected-$(date +\%F)
|
|
|
|
when: group_names | select('search','bgp') | list | count > 0
|
|
|
|
tags:
|
|
|
|
- bgp
|
|
|
|
|
|
|
|
- name: weekly best routes clean up cron job is installed
|
|
|
|
cron:
|
|
|
|
name: bgp best routes clean up
|
|
|
|
minute: 0
|
|
|
|
hour: 4
|
|
|
|
weekday: 0
|
|
|
|
job: >
|
|
|
|
/usr/bin/find /var/log/bgp/
|
|
|
|
-type f
|
|
|
|
-name "rib-selected-*"
|
|
|
|
-mtime +30
|
|
|
|
-exec rm {} \+
|
2020-04-22 11:59:41 +02:00
|
|
|
when: group_names | select('search','bgp') | list | count > 0
|
|
|
|
tags:
|
|
|
|
- bgp
|