Sha256: f6fb2d4a04f2c53d56bb93c5f0b88cf5accd776c2e6c5a46c1875277c5205b37
Contents?: true
Size: 617 Bytes
Versions: 16
Compression:
Stored size: 617 Bytes
Contents
class Specinfra::HostInventory::Parser::Redhat::Base::Service < Specinfra::HostInventory::Parser::Base class << self def parse(cmd_ret) services = {} lines = cmd_ret.split(/\n/) lines.each do |line| status = line.split("\t") next unless status.count == 8 service = status[0].strip enabled = status[4].include?(':on') # level 3 cmd = backend.command.get(:check_service_is_running, service) services[service] = { enabled: enabled, running: backend.run_command(cmd).success? } end services end end end
Version data entries
16 entries across 16 versions & 1 rubygems