templier-ansible/roles/prometheus-blackbox-exporter/tasks/main.yml
Yohann D'ANELLO 2a5f6621b6
Add monitoring
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
2021-06-08 16:59:10 +02:00

24 lines
643 B
YAML

---
- name: Install Prometheus Blackbox exporter
apt:
update_cache: true
name: prometheus-blackbox-exporter
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Make Prometheus Blackbox exporter listen on localhost only
lineinfile:
path: /etc/default/prometheus-blackbox-exporter
regexp: '^ARGS='
line: >
ARGS='--config.file /etc/prometheus/blackbox.yml
--web.listen-address="localhost:9115"'
notify: Restart prometheus-blackbox-exporter
- name: Activate prometheus Blackbox exporter service
systemd:
name: prometheus-blackbox-exporter
enabled: true
state: started