[Prometheus] Listen on adm only when buster

certbot_on_virtu
Alexandre Iooss 2019-05-12 18:35:19 +02:00
parent f30e5c9f21
commit 78e1e38b7b
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
1 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,4 @@
---
- name: Install Prometheus node-exporter
apt:
update_cache: true
@ -7,3 +6,13 @@
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 == 'buster'
lineinfile:
path: /etc/default/prometheus-node-exporter
regexp: '^ARGS='
line: "ARGS=\"--web.listen-address={{ ansible_fqdn }}:9100\""
notify: Restart prometheus-node-exporter