2020-09-28 18:15:03 +02:00
|
|
|
---
|
2021-02-03 23:31:56 +01:00
|
|
|
- name: Install quagga
|
2020-09-28 18:15:03 +02:00
|
|
|
apt:
|
2021-02-03 23:31:56 +01:00
|
|
|
name: quagga
|
2020-09-28 18:15:03 +02:00
|
|
|
|
2021-02-03 23:31:56 +01:00
|
|
|
- name: Tweak sysctl for table size
|
|
|
|
ansible.posix.sysctl:
|
|
|
|
name: net.ipv6.route.max_size
|
2021-02-03 23:51:42 +01:00
|
|
|
value: '500000'
|
2021-02-03 23:31:56 +01:00
|
|
|
sysctl_set: yes
|
2020-09-28 18:15:03 +02:00
|
|
|
|
2021-02-03 23:31:56 +01:00
|
|
|
- name: Setup Quagga configuration
|
2020-09-28 18:15:03 +02:00
|
|
|
template:
|
2021-02-03 23:31:56 +01:00
|
|
|
src: "{{ item }}.j2"
|
2021-02-03 23:51:42 +01:00
|
|
|
dest: "/etc/quagga/{{ item }}"
|
2021-02-03 23:55:44 +01:00
|
|
|
mode: u=rw,g=r,o=
|
2021-02-03 23:31:56 +01:00
|
|
|
loop:
|
2021-02-03 23:51:42 +01:00
|
|
|
- daemons
|
|
|
|
- zebra.conf
|
|
|
|
- bgpd.conf
|
2021-02-03 23:31:56 +01:00
|
|
|
notify:
|
|
|
|
- restart bgpd
|
|
|
|
- restart zebra
|
2020-09-28 18:15:03 +02:00
|
|
|
|
2021-02-03 23:31:56 +01:00
|
|
|
- name: enable+start bgpd and quagga
|
2020-09-28 18:15:03 +02:00
|
|
|
service:
|
2021-02-03 23:31:56 +01:00
|
|
|
name: "{{ item }}"
|
2020-09-28 18:15:03 +02:00
|
|
|
state: started
|
2020-11-04 19:58:54 +01:00
|
|
|
enabled: true
|
2021-02-03 23:31:56 +01:00
|
|
|
loop:
|
|
|
|
- bgpd.service
|
|
|
|
- zebra.service
|
2021-02-04 17:13:24 +01:00
|
|
|
|
|
|
|
- name: Install quagga prometheus exporter
|
|
|
|
template:
|
|
|
|
src: '{{ item.src }}'
|
|
|
|
dest: '{{ item.dest }}'
|
|
|
|
mode: '{{ item.mode }}'
|
|
|
|
loop:
|
2021-02-04 17:38:15 +01:00
|
|
|
- src: quagga.py.j2
|
|
|
|
dest: /usr/share/prometheus-node-exporter/quagga.py
|
2021-02-04 17:13:24 +01:00
|
|
|
mode: "0755"
|
|
|
|
- src: prometheus-node-exporter-quagga.service
|
|
|
|
dest: /etc/systemd/system/prometheus-node-exporter-quagga.service
|
|
|
|
mode: "0644"
|
|
|
|
- src: prometheus-node-exporter-quagga.timer
|
|
|
|
dest: /etc/systemd/system/prometheus-node-exporter-quagga.timer
|
|
|
|
mode: "0644"
|
|
|
|
|
|
|
|
- name: Enable node-exporter
|
|
|
|
service:
|
|
|
|
name: prometheus-node-exporter.service
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
2021-02-03 23:31:56 +01:00
|
|
|
...
|