2021-05-31 16:23:19 +02:00
|
|
|
# {{ ansible_managed }}
|
2021-10-29 18:16:32 +02:00
|
|
|
{% if (prometheus_postgres_exporter_user is defined) and (prometheus_postgres_exporter_password is defined) %}
|
2021-10-29 18:20:10 +02:00
|
|
|
DATA_SOURCE_NAME=postgresql://{{ prometheus_postgres_exporter_user }}:{{ prometheus_postgres_exporter_password }}@{{ prometheus_postgres_exporter_host }}:{{ prometheus_postgres_exporter_port }}/postgres?sslmode={{ prometheus_postgres_exporter_sslmode }}
|
2021-10-29 18:16:32 +02:00
|
|
|
{% else %}
|
2021-09-30 12:25:21 +02:00
|
|
|
DATA_SOURCE_NAME="user={{ prometheus_postgres_exporter_user }} host={{ prometheus_postgres_exporter_host }} sslmode={{ prometheus_postgres_exporter_sslmode }}"
|
2021-10-29 18:16:32 +02:00
|
|
|
{% endif %}
|