Class: Facts::Linux::Mountpoints

Inherits:
Object
  • Object
show all
Defined in:
lib/facter/facts/linux/mountpoints.rb

Constant Summary collapse

FACT_NAME =
'mountpoints'

Instance Method Summary collapse

Instance Method Details

#call_the_resolverObject



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/facter/facts/linux/mountpoints.rb', line 8

def call_the_resolver
  mountpoints = Facter::Resolvers::Mountpoints.resolve(FACT_NAME.to_sym)
  return Facter::ResolvedFact.new(FACT_NAME, nil) unless mountpoints

  fact = {}
  mountpoints.each do |mnt|
    fact[mnt[:path].to_sym] = mnt.reject { |k| k == :path }
  end

  Facter::ResolvedFact.new(FACT_NAME, fact)
end