24 lines
643 B
YAML
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
|