mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 03:43:09 +00:00
enhancement(systemd_exporter): supports multiple web listen addresses in preflight
this is for consistency with the other roles' preflight asserts for when the exporter itself finally supports multiple web listen addresses Signed-off-by: Christian Krause <christian.krause@idiv.de>
This commit is contained in:
parent
5fa22913b4
commit
c8a340e5b3
1 changed files with 12 additions and 1 deletions
|
@ -20,10 +20,21 @@
|
|||
ansible.builtin.package_facts:
|
||||
when: "not 'packages' in ansible_facts"
|
||||
|
||||
- name: Assert that used version supports listen address type
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- >-
|
||||
systemd_exporter_web_listen_address is string
|
||||
|
||||
- name: Naive assertion of proper listen address
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- "':' in systemd_exporter_web_listen_address"
|
||||
- >-
|
||||
[systemd_exporter_web_listen_address] |
|
||||
flatten |
|
||||
reject('match', '.+:\\d+$') |
|
||||
list |
|
||||
length == 0
|
||||
|
||||
- name: Assert that TLS config is correct
|
||||
when: systemd_exporter_tls_server_config | length > 0
|
||||
|
|
Loading…
Reference in a new issue