mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-29 07:10:18 +00:00
af8fc8fd9e
Add a role for deploying the mysqld_exporter. Signed-off-by: SuperQ <superq@gmail.com>
18 lines
688 B
Django/Jinja
18 lines
688 B
Django/Jinja
---
|
|
{{ ansible_managed | comment }}
|
|
{% if mysqld_exporter_tls_server_config | length > 0 %}
|
|
tls_server_config:
|
|
{{ mysqld_exporter_tls_server_config | to_nice_yaml | indent(2, true) }}
|
|
{% endif %}
|
|
|
|
{% if mysqld_exporter_http_server_config | length > 0 %}
|
|
http_server_config:
|
|
{{ mysqld_exporter_http_server_config | to_nice_yaml | indent(2, true) }}
|
|
{% endif %}
|
|
|
|
{% if mysqld_exporter_basic_auth_users | length > 0 %}
|
|
basic_auth_users:
|
|
{% for k, v in mysqld_exporter_basic_auth_users.items() %}
|
|
{{ k }}: {{ v | password_hash('bcrypt', ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' | shuffle(seed=inventory_hostname) | join)[:22], rounds=9) }}
|
|
{% endfor %}
|
|
{% endif %}
|