mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 03:43:09 +00:00
fix: bind_exporter multiple listen addresses definition
Signed-off-by: anviar <oleg.kluchkin+github@gmail.com>
This commit is contained in:
parent
631971b233
commit
3f9aa6eaba
2 changed files with 8 additions and 11 deletions
|
@ -20,17 +20,6 @@
|
|||
ansible.builtin.package_facts:
|
||||
when: "not 'packages' in ansible_facts"
|
||||
|
||||
- name: Assert that used version supports listen address type
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- >-
|
||||
bind_exporter_web_listen_address is string
|
||||
or
|
||||
(
|
||||
bind_exporter_version is version('0.15.0', '>=') and
|
||||
bind_exporter_web_listen_address | type_debug == "list"
|
||||
)
|
||||
|
||||
- name: Naive assertion of proper listen address
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
|
|
|
@ -19,7 +19,15 @@ ExecStart={{ bind_exporter_binary_install_dir }}/bind_exporter \
|
|||
--bind.timeout="{{ bind_exporter_timeout }}" \
|
||||
--bind.pid-file="{{ bind_exporter_pid_file }}" \
|
||||
--bind.stats-version={{ bind_exporter_stats_version }} \
|
||||
{% if bind_exporter_web_listen_address is iterable and
|
||||
bind_exporter_web_listen_address is not mapping and
|
||||
bind_exporter_web_listen_address is not string %}
|
||||
{% for address in bind_exporter_web_listen_address %}
|
||||
--web.listen-address={{ address }} \
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
--web.listen-address={{ bind_exporter_web_listen_address }} \
|
||||
{% endif %}
|
||||
--web.telemetry-path={{ bind_exporter_web_telemetry_path }}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue