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
Name | Documentation |
---|---|
name | Name of the service. This parameter is required. |
expression | Condition expression which will trigger the restart of Service "(package_service_installed |
Outcome conditions
You need to replace ${name}
with its actual canonified value.
- ✅ Ok:
service_restart_${name}_ok
- ☑️ Already compliant:
service_restart_${name}_kept
- 🟨 Repaired:
service_restart_${name}_repaired
- ☑️ Already compliant:
- ❌ Error:
service_restart_${name}_error
Example
method: service_restart_if
params:
name: VALUE
expression: VALUE
Documentation
See service_action for documentation.