18 lines
518 B
YAML
18 lines
518 B
YAML
---
|
|
- name: Install Prometheus node-exporter
|
|
apt:
|
|
update_cache: true
|
|
name: prometheus-node-exporter
|
|
register: apt_result
|
|
retries: 3
|
|
until: apt_result is succeeded
|
|
|
|
# Doesn't work on Debian Stretch
|
|
- name: Make Prometheus node-exporter listen on adm only
|
|
when:
|
|
- ansible_distribution_release != 'stretch'
|
|
lineinfile:
|
|
path: /etc/default/prometheus-node-exporter
|
|
regexp: '^ARGS='
|
|
line: "ARGS=\"--web.listen-address={{ ansible_fqdn }}:9100\""
|
|
notify: Restart prometheus-node-exporter
|