Add an option to configure a service environment

Usecase:

neutron-l3-agent ships a helper script within it's
deployment [1]. neutron-l3-agent expects the script
in it's current path, which may be not always the case [2].
This addition provides OSA the possibility to customize the
path.

[1] a388701ddf/neutron/agent/l3/ha.py (L68)
[2] https://bugs.launchpad.net/openstack-ansible/+bug/1782195

Change-Id: I504a8270be1ddf2f24ab3ad3b4f2f4ca9c990470
This commit is contained in:
Jakob Englisch 2019-01-11 19:23:18 +01:00
parent 7c8ebdcff1
commit b2063bb703
1 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,12 @@ Type={{ service_type }}
User={{ item.systemd_user_name | default(systemd_user_name) }}
Group={{ item.systemd_group_name | default(systemd_group_name) }}
{% if item.environment is defined %}
{% for key, value in item.environment.items() | default({}) %}
Environment="{{ key }}={{ value }}"
{% endfor %}
{% endif %}
{% set _execstarts = item.execstarts %}
{% if _execstarts is string %}
{% set _execstarts = [_execstarts] %}