python3: unorderable types: dict() < dict()
ID: /etc/prometheus/prometheus.yml
Function: file.managed
Result: False
Comment: Unable to manage file: Jinja error: unorderable types: dict() < dict()
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/utils/templates.py", line 392, in render_jinja_tmpl
output = template.render(**decoded_context)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "<template>", line 49, in top-level template code
File "/usr/lib/python3/dist-packages/jinja2/filters.py", line 264, in do_sort
return sorted(value, key=sort_func, reverse=reverse)
TypeError: unorderable types: dict() < dict()
; line 49
---
[...]
# If prometheus-node-exporter is installed, grab stats about the local
# machine by default.
static_configs:
- targets:
- 'localhost:9100'
{%- for remote_grains in salt['mine.get']('*', 'grains.items', tgt_type='glob').values()|sort if remote_grains.fqdn != grains.fqdn %} <======================
- '{{ remote_grains.fqdn }}:9100'
{%- endfor %}
{% set nginx_targets = salt['prometheus.prometheus_targets_for_grain']('prometheus_nginx_export') %}
- job_name: nginx
[...]
---
Started: 18:26:56.329883
Duration: 649.377 ms
Changes: