mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 03:43:09 +00:00
Remove unnecessary extra dependency
This is fairly straightforward manipulation to do with standard Jinja features. Signed-off-by: Paul Arthur <paul.arthur@flowerysong.com>
This commit is contained in:
parent
4897613f75
commit
89ec2ce0f7
3 changed files with 1 additions and 3 deletions
|
@ -13,7 +13,6 @@ When upgrading from <= 2.4.0 version of this role to >= 2.4.1 please turn off yo
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Ansible >= 2.7 (It might work on previous versions, but we cannot guarantee it)
|
- Ansible >= 2.7 (It might work on previous versions, but we cannot guarantee it)
|
||||||
- jmespath on deployer machine. If you are using Ansible from a Python virtualenv, install *jmespath* to the same virtualenv via pip.
|
|
||||||
- gnu-tar on Mac deployer host (`brew install gnu-tar`)
|
- gnu-tar on Mac deployer host (`brew install gnu-tar`)
|
||||||
|
|
||||||
## Role Variables
|
## Role Variables
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
- name: Get all file_sd files from scrape_configs
|
- name: Get all file_sd files from scrape_configs
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
file_sd_files: "{{ prometheus_scrape_configs | json_query('[*][].file_sd_configs[*][].files[]') }}"
|
file_sd_files: "{{ prometheus_scrape_configs | selectattr('file_sd_configs', 'defined') | map(attribute='file_sd_configs') | flatten | map(attribute='files') | flatten }}"
|
||||||
|
|
||||||
- name: Fail when file_sd targets are not defined in scrape_configs
|
- name: Fail when file_sd targets are not defined in scrape_configs
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
molecule
|
molecule
|
||||||
docker
|
docker
|
||||||
pytest-testinfra
|
pytest-testinfra
|
||||||
jmespath
|
|
||||||
selinux
|
selinux
|
||||||
passlib
|
passlib
|
||||||
|
|
Loading…
Reference in a new issue