ansible-role-systemd-service icon indicating copy to clipboard operation
ansible-role-systemd-service copied to clipboard

ExecReload does not format multiple instances correctly

Open djarbz opened this issue 3 years ago • 0 comments

In the service template as shown below, the ExecReload in the for loop should reference exec_reload instead of the given array. https://github.com/cimon-io/ansible-role-systemd-service/blob/4dbe5591bd7a660d62215709476fd65ddc64eb14/templates/etc/systemd/system/systemd.service.j2#L244-L252

Correct format:

{% if systemd_service[item].exec_reload is defined %}
{% if systemd_service[item].exec_reload is not string %}
{% for exec_reload in systemd_service[item].exec_reload -%}
ExecReload={{ exec_reload }}
{% endfor %}
{% else %}
ExecReload={{ systemd_service[item].exec_reload }}
{% endif -%}
{% endif -%}

djarbz avatar Jan 30 '22 00:01 djarbz