32 lines
882 B
YAML
32 lines
882 B
YAML
---
|
|
- name: Configure the exporter to allow pings
|
|
debconf:
|
|
name: prometheus-blackbox-exporter
|
|
question: prometheus-blackbox-exporter/want_cap_net_raw
|
|
value: "true"
|
|
vtype: boolean
|
|
notify: Restart prometheus-blackbox-exporter
|
|
|
|
- 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
|