mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-26 13:50:20 +00:00
a38e7eed3f
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>
10 lines
304 B
Django/Jinja
10 lines
304 B
Django/Jinja
{{ ansible_managed | comment }}
|
|
[client]
|
|
user={{ mysqld_exporter_username }}
|
|
password={{ mysqld_exporter_password }}
|
|
{% if mysqld_exporter_host %}
|
|
host={{ mysqld_exporter_host }}
|
|
port={{ mysqld_exporter_port }}
|
|
{% elif mysqld_exporter_socket is defined %}
|
|
socket={{ mysqld_exporter_socket }}
|
|
{% endif %}
|