Allow user/group to be overriden in unit section
The unit section allows for user/group to be set via global variable however in some cases a specific unit may need to have a different user/group setup. This change allows for the users to be defined in the service definition and falls back to the global default. Change-Id: I69540efd2c993912b042a1b6b6a1dc279542f325 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
2218eb54d9
commit
f79988efca
@ -13,8 +13,8 @@ Documentation={{ item }}
|
|||||||
[Service]
|
[Service]
|
||||||
{% set service_type = item.service_type | default(systemd_default_service_type) %}
|
{% set service_type = item.service_type | default(systemd_default_service_type) %}
|
||||||
Type={{ service_type }}
|
Type={{ service_type }}
|
||||||
User={{ systemd_user_name }}
|
User={{ item.systemd_user_name | default(systemd_user_name) }}
|
||||||
Group={{ systemd_group_name }}
|
Group={{ item.systemd_group_name | default(systemd_group_name) }}
|
||||||
|
|
||||||
{% set _execstarts = item.execstarts %}
|
{% set _execstarts = item.execstarts %}
|
||||||
{% if _execstarts is string %}
|
{% if _execstarts is string %}
|
||||||
|
Loading…
Reference in New Issue
Block a user