service_restart_if

Restart a service using the appropriate method if the specified class is true, otherwise it is considered as not required and success classes are returned.

⚙️ Compatible targets: Linux

⚠️ Deprecated: This method is deprecated and should not be used.

Parameters

NameDocumentation
nameName of the service.

This parameter is required.
expressionCondition expression which will trigger the restart of Service "(package_service_installed

Example

method: service_restart_if
params:
  expression: VALUE
  name: VALUE

Documentation

See service_action for documentation.