This module manages SystemD services files
This module has been tested to work on the following systems.
- EL 7
Define the unit parameters.
- Default: undef
Ensure attribute for unit file resource. Valid values are 'present' and 'absent'.
- Default: 'present'
Path to systemd unit files.
- Default: '/etc/systemd/system'
List of units that must be started before the unit being configured.
- Default: undef
List of units that must be started after the unit being configured.
- Default: undef
A free-form string describing the unit.
- Default: undef
List of units that will be activated as well as the unit being configured.
- Default: undef
Set environment variables for executed processes. Takes a list of space-separated list of variable assignments.
- Default: undef
Group running the service.
- Default: undef
User running the service.
- Default: undef
Defines on which directory the service will be launched from.
- Default: undef
Configures the process start-up type for this service unit. Valid values are: 'simple', 'forking', 'oneshot', 'dbus', 'notify' and 'idle'.
- Default: 'simple'
Configures the time to wait for start-up. If a daemon service does not signal start-up completion within the configured time, the service will be considered failed and will be shut down again. Takes a unit-less value in seconds, or a time span value such as "5min 20s".
- Default: undef
Configures whether the service shall be restarted when the service process exits, is killed, or a timeout is reached.
- Default: undef
Configures the time to sleep before restarting a service (as configured with Restart=). Takes a unit-less value in seconds, or a time span value such as "5min 20s".
- Default: undef
Additional commands that are executed before the command in service_execstart.
- Default: undef
Commands with their arguments that are executed when this service is started.
- Default: undef
Commands to execute to stop the service started via service_execstart.
- Default: undef
The most common way to specify how a unit should be enabled. This directive allows you to specify a dependency relationship in a similar way to the Wants= directive does in the [Unit] section.
- Default: undef
Define service 'myservice' as a systemd unit.
systemd::units:
'myservice':
unit_description: 'This is my service'
service_timeoutstartsec: 0
service_execstartpre: [ '-/usr/bin/command --kill' , '-/usr/bin/command --rm' ]
service_execstart: "/usr/bin/command run --fqdn %{fqdn}"
service_execstop: '/usr/bin/command --kill'
install_wantedby: 'multi-user.target'