1
0
Fork 0
mirror of https://gitlab.com/s3lph/ansible-collection-prometheus synced 2024-12-23 00:37:33 +01:00

fix jinja error

This commit is contained in:
s3lph 2021-11-06 06:01:42 +01:00
parent 36d668ef4a
commit a51e359471

View file

@ -21,7 +21,7 @@
mode: 0644
validate: /usr/bin/promtool check rules %s
vars:
alert_groups: "{{ hostvars[inventory_hostname] | dict2items | selectattr('key', 'match', '^prometheus_job_.+$') | map(attribute='value') | map(attribute='group') | select('defined') | unique | default([prometheus_job_default_group_name]) }}"
alert_groups: "{{ hostvars[inventory_hostname] | dict2items | selectattr('key', 'match', '^prometheus_job_.+$') | map(attribute='value') | map(attribute='group', default=prometheus_job_default_group_name) | unique | list }}"
jobs: "{{ hostvars[inventory_hostname] | dict2items | selectattr('key', 'match', '^prometheus_job_.+$') | map(attribute='value') | list }}"
notify: restart prometheus