mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-12-22 08:17:33 +01:00
Fix unwanted hostvars propagation in prometheus job target loop
This commit is contained in:
parent
89614cdaa2
commit
04bf2db312
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,8 @@
|
|||
- targets:
|
||||
{% for host in groups['all'] -%}
|
||||
{% if hostvars[host]['monitor_' + job.name] | default(false) | bool -%}
|
||||
{%- set fstring = job.defaults | default({}) -%}
|
||||
{%- set fstring = {} -%}
|
||||
{%- set ignored = fstring.update(job.defaults|default({})) -%}
|
||||
{%- set ignored = fstring.update(hostvars[host]) -%}
|
||||
- {{ job.target_format | format(**fstring) }}
|
||||
{% endif -%}
|
||||
|
|
Loading…
Reference in a new issue