ansible-role-systemd_service/templates/systemd-service-overrides.j2
Andrew Bonney 3c924d2531 templates: fix typo in string/mapping check
A small typo that appears to have been missed during review,
which can cause strings (for example) to be iterated over rather
than included directly.

Change-Id: Id1a9d7088f97b709c46d5f4563c0c498604f999e
2021-01-18 13:01:29 +00:00

14 lines
349 B
Django/Jinja

{% for section, params in item.systemd_overrides.items() %}
[{{ section }}]
{% for key, value in params.items() %}
{% if value is iterable and (value is not string and value is not mapping) %}
{% for i in value %}
{{ key }} = {{ i }}
{% endfor %}
{% else %}
{{ key }} = {{ value }}
{% endif %}
{% endfor %}
{% endfor %}