55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
---
|
|
- name: Install quagga
|
|
apt:
|
|
name: quagga
|
|
|
|
- name: Tweak sysctl for table size
|
|
ansible.posix.sysctl:
|
|
name: net.ipv6.route.max_size
|
|
value: '500000'
|
|
sysctl_set: yes
|
|
|
|
- name: Setup Quagga configuration
|
|
template:
|
|
src: "{{ item }}.j2"
|
|
dest: "/etc/quagga/{{ item }}"
|
|
mode: u=rw,g=r,o=
|
|
loop:
|
|
- daemons
|
|
- zebra.conf
|
|
- bgpd.conf
|
|
notify:
|
|
- restart bgpd
|
|
- restart zebra
|
|
|
|
- name: enable+start bgpd and quagga
|
|
service:
|
|
name: "{{ item }}"
|
|
state: started
|
|
enabled: true
|
|
loop:
|
|
- bgpd.service
|
|
- zebra.service
|
|
|
|
- name: Install quagga prometheus exporter
|
|
template:
|
|
src: '{{ item.src }}'
|
|
dest: '{{ item.dest }}'
|
|
mode: '{{ item.mode }}'
|
|
loop:
|
|
- src: 'quagga.py.j2'
|
|
dest: '/usr/share/prometheus-node-exporter/quagga.py
|
|
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
|
|
...
|