refactor(nut): merge prometheus exporter into nut role

- exporter gated by nut_prometheus_exporter_enabled
- env-file config (correct NUT_EXPORTER_* vars + --web.listen-address)
- remove standalone nut_exporter role
This commit is contained in:
Clément Désiles
2026-09-05 17:24:12 +02:00
parent 12b81919c3
commit 5218fa2714
14 changed files with 88 additions and 151 deletions
@@ -0,0 +1,5 @@
# Managed by Ansible - DO NOT EDIT MANUALLY
# EnvironmentFile for prometheus-nut-exporter (read by the systemd unit via
# $NUT_EXPORTER_ARGS). The password has no flag, so it is passed as an env var.
NUT_EXPORTER_ARGS="--web.listen-address={{ nut_prometheus_exporter_listen_address }} --nut.server={{ nut_prometheus_exporter_nut_server.split(':')[0] }} --nut.serverport={{ nut_prometheus_exporter_nut_server.split(':')[1] }} --nut.username={{ nut_prometheus_exporter_nut_user }}"
NUT_EXPORTER_PASSWORD="{{ nut_monitor_password }}"