From f6e311cd4c7f2bfbf77051b1d68dcb50738d5ae7 Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Tue, 26 Jul 2022 17:15:59 +0200 Subject: [PATCH] mysql - add host option --- templates/conf/prometheus-mysqld-exporter.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/conf/prometheus-mysqld-exporter.j2 b/templates/conf/prometheus-mysqld-exporter.j2 index f04d436..7579c5e 100644 --- a/templates/conf/prometheus-mysqld-exporter.j2 +++ b/templates/conf/prometheus-mysqld-exporter.j2 @@ -1,4 +1,7 @@ # {{ ansible_managed }} [client] +{% if prometheus_mysqld_exporter_host is defined %} +host={{ prometheus_mysqld_exporter_host }} +{% endif%} user={{ prometheus_mysqld_exporter_user }} password={{ prometheus_mysqld_exporter_password }}