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:
Christian Krause 2023-11-20 10:45:26 +01:00
parent 5fa22913b4
commit c8a340e5b3
No known key found for this signature in database
GPG key ID: 3CD613B9A8567F58

View file

@ -20,10 +20,21 @@
ansible.builtin.package_facts: ansible.builtin.package_facts:
when: "not 'packages' in ansible_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 - name: Naive assertion of proper listen address
ansible.builtin.assert: ansible.builtin.assert:
that: 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 - name: Assert that TLS config is correct
when: systemd_exporter_tls_server_config | length > 0 when: systemd_exporter_tls_server_config | length > 0