ansible-collection-prometheus/roles/node_exporter/templates/config.yaml.j2
Paweł Krupa (paulfantom) dcfbfa84d2 initial migration of roles from cloudalchemy
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
2022-09-23 13:29:55 +02:00

18 lines
676 B
Django/Jinja

---
{{ ansible_managed | comment }}
{% if node_exporter_tls_server_config | length > 0 %}
tls_server_config:
{{ node_exporter_tls_server_config | to_nice_yaml | indent(2, true) }}
{% endif %}
{% if node_exporter_http_server_config | length > 0 %}
http_server_config:
{{ node_exporter_http_server_config | to_nice_yaml | indent(2, true) }}
{% endif %}
{% if node_exporter_basic_auth_users | length > 0 %}
basic_auth_users:
{% for k, v in node_exporter_basic_auth_users.items() %}
{{ k }}: {{ v | password_hash('bcrypt', ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' | shuffle(seed=inventory_hostname) | join)[:22], rounds=9) }}
{% endfor %}
{% endif %}