systemd_service
The systemd_service module allows you to manage a systemd service on a target server.
Arguments
name: a string that contains the name of the service to be managed.action: a string that specifies the action to be taken on the service. (default isstart. Supported actions:start,stop,restart,reload,enable,disable)daemon_reload: a boolean that indicates whether to reload the systemd daemon before taking the action. (default isfalse)force: a boolean that indicates whether to force the action to be taken. (default isfalse)
Usage Example
local task = {
name = "Restart apache2 service",
komandan.modules.systemd_service({
name = "apache2.service",
action = "restart",
})
}
komandan.komando(host, task)