Sha256: 2e19aa0443caf7f203c9b02e282c3200f458df0a41d606c36be4f7be1e5a147d
Contents?: true
Size: 596 Bytes
Versions: 14
Compression:
Stored size: 596 Bytes
Contents
# frozen_string_literal: true module Facter module Resolvers class Augeas < BaseResolver @semaphore = Mutex.new @fact_list ||= {} class << self private def post_resolve(fact_name) @fact_list.fetch(fact_name) { read_augeas_version(fact_name) } end def read_augeas_version(fact_name) output, _status = Open3.capture2('augparse --version 2>&1') @fact_list[:augeas_version] = Regexp.last_match(1) if output =~ /^augparse (\d+\.\d+\.\d+)/ @fact_list[fact_name] end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems