Sha256: 369822f0883c2e33dc3b2a9a5e5fe4b3eebb6a31ae370629b939c3a638190bd3
Contents?: true
Size: 818 Bytes
Versions: 8
Compression:
Stored size: 818 Bytes
Contents
# frozen_string_literal: true module Facter module Resolvers module Aix class Filesystem < BaseResolver @fact_list ||= {} class << self private def post_resolve(fact_name) @fact_list.fetch(fact_name) { read_vtf_file(fact_name) } end def read_vtf_file(fact_name) file_content = Util::FileHelper.safe_readlines('/etc/vfs') return if file_content.empty? file_content = file_content.map do |line| next if line =~ /#|%/ # skip lines that are comments or defaultvfs line line.split(' ').first end @fact_list[:file_systems] = file_content.compact.sort.join(',') @fact_list[fact_name] end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems