mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-25 13:20:22 +00:00
fix(mysqld_exporter): Change condition for mysqld_exporter_host check
Modify the condition for `mysqld_exporter_host` in the mysqld_exporter my_cnf.j2 template to address an issue where `mysqld_exporter_host: null` in roles/defaults/main.yml was not being handled correctly. The updated condition ensures the host setting logic operates properly even when `mysqld_exporter_host` is set to null. Signed-off-by: molpako <system.222.down@gmail.com>
This commit is contained in:
parent
172b4bbb08
commit
a38e7eed3f
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
[client]
|
||||
user={{ mysqld_exporter_username }}
|
||||
password={{ mysqld_exporter_password }}
|
||||
{% if mysqld_exporter_host is defined %}
|
||||
{% if mysqld_exporter_host %}
|
||||
host={{ mysqld_exporter_host }}
|
||||
port={{ mysqld_exporter_port }}
|
||||
{% elif mysqld_exporter_socket is defined %}
|
||||
|
|
Loading…
Reference in a new issue