ansible-collection-prometheus/roles/pushgateway/templates/web_config.yml.j2
SuperQ c676915376
feat: Add pushgateway role
Add role to manage the Prometheus Pushgateway.

Signed-off-by: SuperQ <superq@gmail.com>
2023-07-11 08:31:38 +02:00

18 lines
673 B
Django/Jinja

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