mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-25 05:10:20 +00:00
Limit scrape_config_files to supported versions
Signed-off-by: Leonhard Mayr <leonhard.mayr@manz.at>
This commit is contained in:
parent
60fe2d4332
commit
62f1a07b6f
2 changed files with 3 additions and 0 deletions
|
@ -153,6 +153,7 @@ argument_specs:
|
|||
prometheus_scrape_config_files:
|
||||
description:
|
||||
- "List of folders where ansible will look for files containing custom scrape config configuration files which will be copied to C({{ prometheus_config_dir }}/scrapes/)."
|
||||
- "This feature is available starting from Prometheus v2.43.0."
|
||||
type: "list"
|
||||
elements: "str"
|
||||
default:
|
||||
|
|
|
@ -35,7 +35,9 @@ alerting:
|
|||
scrape_configs:
|
||||
{{ prometheus_scrape_configs | to_nice_yaml(indent=2,sort_keys=False) | indent(2,False) }}
|
||||
|
||||
{% if prometheus_version is version('2.43.0', '>=') %}
|
||||
{% if prometheus_scrape_config_files != [] %}
|
||||
scrape_config_files:
|
||||
- scrapes/*
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue