Add a documentation list default

This change adds the documentation list default to our systemd service
files when populated. This is feature will provide us the ability to
link services to specific documentation which operators will be able to
see when querying a service.

Change-Id: I514d907ccbb52cc6010a29c4c3e10eb2cf558dfa
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-04-03 11:17:41 -05:00
parent b6ffe52a94
commit 1c580bbdbc
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
2 changed files with 8 additions and 0 deletions

View File

@ -47,6 +47,11 @@ systemd_after_targets:
- syslog.target
- network.target
# List of documentation information that will be presented in the unit. This
# option is a list of documentation items which can be local or online.
# Usage: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Documentation=
systemd_unit_docs: []
# Set the service enabled state. Valid options are: [yes, no]
systemd_service_enabled: yes

View File

@ -5,6 +5,9 @@ Description={{ item.service_name }} service
{% for item in systemd_after_targets %}
After={{ item }}
{% endfor %}
{% for item in systemd_unit_docs %}
Documentation={{ item }}
{% endfor %}
[Service]
{% set service_type = item.service_type | default(systemd_default_service_type) %}