lib/shared/pe_status_check.rb
def service_running(name, service = nil)
    service ||= get_resource('service', name)
    return false if service.nil?

    service[:ensure] == :running
  end
# Check if the service is running
# @param name [String] The name of the service
# @param service [Puppet::Resource] An optional service resource to use
# @return [Boolean] True if the service is running
Check if the service is running
Check if the service is running
def service_running(name, service = nil)
    service ||= get_resource('service', name)
    return false if service.nil?
    service[:ensure] == :running
  end
def service_running ( name , service = nil ) service ||= get_resource ( 'service' , name ) return false if service . nil? service [ :ensure ] == :running end
Check if the service is running
Check if the service is running
True if the service is running
True if the service is running
Boolean
name
The name of the service
The name of the service
service
An optional service resource to use
An optional service resource to use