ansible/roles/prometheus-node/tasks/main.yml
2019-05-05 16:17:52 +02:00

15 lines
429 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
- name: Make Prometheus node-exporter listen on adm only
lineinfile:
path: /etc/default/prometheus-node-exporter
regexp: '^ARGS='
line: "ARGS=\"--web.listen-address={{ ansible_fqdn }}:9100\""
notify: Restart prometheus-node-exporter