Sha256: b64cde2505449fabee9386694a5fd3f40d3aee17d5b08d777ce57bc28d7a1283
Contents?: true
Size: 899 Bytes
Versions: 29
Compression:
Stored size: 899 Bytes
Contents
# frozen_string_literal: true module Facter module Resolvers class Architecture < BaseResolver # :architecture @semaphore = Mutex.new @fact_list ||= {} class << self private def post_resolve(fact_name) @fact_list.fetch(fact_name) { read_architecture(fact_name) } end def read_architecture(fact_name) require_relative 'utils/odm_query' odmquery = ODMQuery.new odmquery .equals('name', 'proc0') .equals('attribute', 'type') result = odmquery.execute return unless result result.each_line do |line| if line.include?('value') @fact_list[:architecture] = line.split('=')[1].strip.delete('\"') break end end @fact_list[fact_name] end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems