README.md 713 B

Ansible Role: Systemd Unit

Required Variables

systemd_unit_name: some.service

Optional Variables

systemd_unit_scope: global # "system" (default), "global" or "user"
systemd_unit_config: |
  [Unit]
  Description=…
  # …
systemd_unit_dropin_config_name: custom # default: "override"
systemd_unit_dropin_config: |
  [Service]
  LogLevelMax=notice
  # …
systemd_unit_state: started
systemd_unit_enabled: yes
systemd_unit_restart_if_active: no

Return Values

systemd_unit_config_changed

Limitations

For systemd_unit_scope != "system" the following features are not yet supported: automatic daemon reloads, changing unit's state and enabling/disabling units