mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-11-23 02:01:10 +01:00
Fix conflicting variable names
This commit is contained in:
parent
12ad0c0dc3
commit
53c7a9ca75
2 changed files with 3 additions and 3 deletions
|
@ -21,14 +21,14 @@
|
|||
mode: 0644
|
||||
validate: /usr/bin/promtool check rules %s
|
||||
vars:
|
||||
groups: "{{ hostvars[inventory_hostname] | dict2items | selectattr('key', 'match', '^prometheus_job_.+$') | map(attribute='value') | map(attribute='group') | unique | default([prometheus_job_default_group_name]) }}"
|
||||
alert_groups: "{{ hostvars[inventory_hostname] | dict2items | selectattr('key', 'match', '^prometheus_job_.+$') | map(attribute='value') | map(attribute='group') | unique | default([prometheus_job_default_group_name]) }}"
|
||||
jobs: "{{ hostvars[inventory_hostname] | dict2items | selectattr('key', 'match', '^prometheus_job_.+$') | map(attribute='value') | list }}"
|
||||
notify: restart prometheus
|
||||
|
||||
- name: render /etc/default/prometheus
|
||||
ansible.builtin.template:
|
||||
src: etc/default/prometheus.j2
|
||||
path: /etc/default/prometheus
|
||||
dest: /etc/default/prometheus
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
groups:
|
||||
|
||||
{% for group in groups %}
|
||||
{% for group in alert_groups %}
|
||||
|
||||
- name: {{ group }}
|
||||
rules:
|
||||
|
|
Loading…
Reference in a new issue