ansible/roles/ipv6_edge_router/tasks/main.yml

56 lines
1.2 KiB
YAML
Raw Normal View History

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
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"
dest: "/etc/quagga/{{ item }}"
mode: u=rw,g=r,o=
2021-02-03 23:31:56 +01:00
loop:
- 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
- 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
mode: "0755"
2021-02-04 20:54:52 +01:00
- src: prometheus-node-exporter-quagga.service.j2
dest: /etc/systemd/system/prometheus-node-exporter-quagga.service
mode: "0644"
2021-02-04 20:54:52 +01:00
- src: prometheus-node-exporter-quagga.timer.j2
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
...