Sha256: 3567ea4412dd49761c089fa09e6c8333756d7d502ff442771d1632d09c037c65
Contents?: true
Size: 601 Bytes
Versions: 17
Compression:
Stored size: 601 Bytes
Contents
class Specinfra::HostInventory::Parser::Redhat::V7::Service < Specinfra::HostInventory::Parser::Base class << self def parse(cmd_ret) services = {} lines = cmd_ret.split(/\n/) lines.each do |line| status = line.split(/ +/) next unless status.count == 2 service = status[0].gsub(/\.service\z/, '') cmd = backend.command.get(:check_service_is_running, service) services[service] = { enabled: status[1].include?('enabled'), running: backend.run_command(cmd).success? } end services end end end
Version data entries
17 entries across 17 versions & 1 rubygems