Skip to content

Commit 52903dc

Browse files
committed
Fix prometheus_blackbox_exporter_endpoints to allow truthy values
1 parent c2c9b28 commit 52903dc

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

etc/kayobe/kolla/inventory/group_vars/prometheus-blackbox-exporter

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@
66
# prometheus_blackbox_exporter_endpoints_kayobe is another set of default
77
# endpoints that are templated by Kayobe rather than Kolla Ansible. See
88
# kolla/globals.yml for more details.
9-
prometheus_blackbox_exporter_endpoints: >-
10-
{{ (prometheus_blackbox_exporter_endpoints_kayobe | default([]) +
11-
prometheus_blackbox_exporter_endpoints_default) |
12-
selectattr('enabled', 'true') |
13-
map(attribute='endpoints') | flatten |
14-
union(prometheus_blackbox_exporter_endpoints_custom) |
15-
unique | select | list }}
9+
prometheus_blackbox_exporter_endpoints: |
10+
{% set endpoints = [] %}
11+
{% for dict_item in (prometheus_blackbox_exporter_endpoints_kayobe | default([]) + prometheus_blackbox_exporter_endpoints_default) %}
12+
{% if dict_item.enabled | bool %}
13+
{% for endpoint in dict_item.endpoints %}
14+
{% set _ = endpoints.append(endpoint) %}
15+
{% endfor %}
16+
{% endif %}
17+
{% endfor %}
18+
{{ (endpoints + prometheus_blackbox_exporter_endpoints_custom) | unique }}
1619

1720
# A list of custom prometheus Blackbox exporter endpoints. Each element should
1821
# have the following format:

0 commit comments

Comments
 (0)