The cacert should be a file path

The cacert in clouds.yaml in openstack should be a file path, otherwise
the exporter will fail to start when TLS plugin is enabled. Also,
preserve the indentation for `cacert` or `verify`.

Bug: #2074047
Change-Id: I8c9e8857bafcd3121e44df8228a96bb0b32d077b
This commit is contained in:
Chi Wai Chan 2024-07-25 12:05:46 +08:00 committed by Chi Wai CHAN
parent 2266f650f9
commit ca875b8dd1

View File

@ -10,8 +10,8 @@ clouds:
project_domain_name: {{ os_exporter.domain_name }}
user_domain_name: {{ os_exporter.domain_name }}
auth_url: {{ os_exporter.auth_url }}
{% if receive_ca_cert and receive_ca_cert.ca_bundle -%}
cacert: {{ receive_ca_cert.ca_bundle }}
{% else -%}
{%- if receive_ca_cert and receive_ca_cert.ca_bundle %}
cacert: /usr/local/share/ca-certificates/ca-bundle.pem
{%- else %}
verify: false
{% endif -%}
{%- endif %}