mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-12-22 08:17:33 +01:00
dnsbl exporter: fix targets.ini
This commit is contained in:
parent
1aa32f43d7
commit
6b005a99e3
2 changed files with 5 additions and 5 deletions
|
@ -18,8 +18,6 @@
|
|||
template:
|
||||
src: etc/prometheus/dnsbl-exporter/targets.ini.j2
|
||||
dest: /etc/prometheus/dnsbl-exporter/targets.ini
|
||||
vars:
|
||||
targets: "{{ hostvars.keys() | selectattr('monitor_dnsbl', 'true') }}"
|
||||
notify: restart prometheus-dnsbl-exporter
|
||||
|
||||
- name: start and enable prometheus-dnsbl-exporter
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
[targets]
|
||||
{% for target in targets %}
|
||||
server={{ target }}
|
||||
{% endfor %}
|
||||
{%- for host in hostvars.keys() %}
|
||||
{%- if hostvars[host].monitor_dnsbl | default(true) %}
|
||||
server={{ host }}
|
||||
{%- endfor %}
|
||||
{%- endfor %}
|
Loading…
Reference in a new issue