diff --git a/defaults/main.yml b/defaults/main.yml index 43634f2..6da40b0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/templates/systemd-service.j2 b/templates/systemd-service.j2 index de3719c..da2b0f3 100644 --- a/templates/systemd-service.j2 +++ b/templates/systemd-service.j2 @@ -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) %}