Skip to content

Commit

Permalink
Add quotes around keys in exporter config template
Browse files Browse the repository at this point in the history
These quotes are added to fix the pydantic error caused while reading
the yaml file. If the quotes are absent for the redfish keys, the
default value of empty string is registered as a None type while using
safe_load and reading the yaml file in prometheus-hardware-exporter.

Fixes canonical#43
  • Loading branch information
dashmage committed Jul 27, 2023
1 parent 27540b7 commit 705b0e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/hardware-exporter-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ enable_collectors:
{% endif %}

{% if REDFISH_ENABLE %}
redfish_host: {{ REDFISH_HOST }}
redfish_username: {{ REDFISH_USERNAME }}
redfish_password: {{ REDFISH_PASSWORD }}
redfish_host: "{{ REDFISH_HOST }}"
redfish_username: "{{ REDFISH_USERNAME }}"
redfish_password: "{{ REDFISH_PASSWORD }}"
{% endif %}

0 comments on commit 705b0e8

Please sign in to comment.