bird: install prometheus-bird-exporter
This commit is contained in:
parent
64dcb4b282
commit
1c47ccc4a8
4 changed files with 30 additions and 1 deletions
|
@ -11,4 +11,5 @@ bird__radv_dns_servers: []
|
|||
bird__radv_max_interval: 5
|
||||
bird__static_unreachable: []
|
||||
bird__bgp_sessions: []
|
||||
bird__prometheus_listen_address: 0.0.0.0:9324
|
||||
...
|
||||
|
|
|
@ -3,4 +3,10 @@
|
|||
systemd:
|
||||
name: bird.service
|
||||
state: reloaded
|
||||
|
||||
- name: Reload prometheus-bird-exporter
|
||||
systemd:
|
||||
name: prometheus-bird-exporter.service
|
||||
state: reloaded
|
||||
...
|
||||
...
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
---
|
||||
- name: Install bird
|
||||
apt:
|
||||
name: bird2
|
||||
name:
|
||||
- bird2
|
||||
- prometheus-bird-exporter
|
||||
|
||||
- name: Configure bird
|
||||
template:
|
||||
|
@ -13,9 +15,26 @@
|
|||
notify:
|
||||
- Reload bird
|
||||
|
||||
- name: Configure prometheus-bird-exporter
|
||||
template:
|
||||
src: prometheus-bird-exporter.j2
|
||||
dest: /etc/default/prometheus-bird-exporter
|
||||
owner: root
|
||||
group: root
|
||||
mode: u=rw,g=r,o=
|
||||
notify:
|
||||
- Restart prometheus-bird-exporter
|
||||
|
||||
- name: Enable and start bird
|
||||
systemd:
|
||||
name: bird.service
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Enable and start prometheus-bird-exporter
|
||||
systemd:
|
||||
name: prometheus-bird-exporter.service
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
...
|
||||
|
|
3
roles/bird/templates/prometheus-bird-exporter.j2
Normal file
3
roles/bird/templates/prometheus-bird-exporter.j2
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
ARGS="-format.new -bird.v2 -web.listen-address {{ bird__prometheus_listen_address }}"
|
Loading…
Reference in a new issue