Initial commit

configure node_exporter to listen to the vpn ip
This commit is contained in:
Mathieu Pasquet 2021-01-03 20:46:33 +01:00
commit 84f55900cb
2 changed files with 22 additions and 0 deletions

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Monitored ansible role
This ansible role enables prometheus-node-exporter on a private IP (from tinc VPN).
# Expected host vars
**vpn_ip**

15
tasks/main.yml Normal file
View File

@ -0,0 +1,15 @@
---
- name: configure node_exporter
lineinfile:
path: /etc/conf.d/prometheus-node-exporter
regexp: '^NODE_EXPORTER_ARGS='
line: NODE_EXPORTER_ARGS="--web.listen-address={{ vpn_ip }}:9100
create: yes
- name: Enable node_exporter
systemd:
enabled: true
state: started
name: prometheus-node-exporter