ansible/roles/bird/tasks/main.yml

40 lines
752 B
YAML

---
- name: Install bird
apt:
name:
- bird2
- prometheus-bird-exporter
- name: Configure bird
template:
src: bird.conf.j2
dest: /etc/bird/bird.conf
owner: root
group: bird
mode: u=rw,g=r,o=
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
...