fixed jobs without labels

This commit is contained in:
nd 2020-06-07 01:14:58 +02:00
parent d352baab14
commit 9e38ba7d64
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9

View file

@ -34,7 +34,7 @@
{% for t in job.targets %}
- {{ t }}
{% endfor %}
labels: {{ merged_prometheus_labels|combine(job.labels)|to_json }}
labels: {{ merged_prometheus_labels|combine(job.labels|d({}))|to_json }}
tls_config:
ca_file: /etc/prometheus/targetcerts/{{ inventory_hostname }}.crt
cert_file: /etc/ssl/prometheus_scraper.crt