I was said to use the onlyif-parameter, but there doesn't seem to exist one for the service-type.
What can I do to enable this service only if it's installed? It's installed with a binary installer, so testing if the installation directory exists t
class scom {
service { 'scx-cimd':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
onlyif => "test -f /opt/microsoft/scx"
}
}
The current error message is "Invalid parameter onlyif", because service doesn't have an onlyif parameter. What can I do to enable this service only if it's installation directory exists?