class Facts::Linux::Partitions
Constants
- FACT_NAME
Public Instance Methods
call_the_resolver()
click to toggle source
# File lib/facter/facts/linux/partitions.rb, line 8 def call_the_resolver Facter::ResolvedFact.new(FACT_NAME, partitions) end
partitions()
click to toggle source
# File lib/facter/facts/linux/partitions.rb, line 12 def partitions parts = Facter::Resolvers::Partitions.resolve(:partitions) # We should exit early if we are running on a node with no partitions # (e.g. a diskless, netbooted VM) return nil unless parts mountpoints = Facter::Resolvers::Mountpoints.resolve(:mountpoints) return parts unless mountpoints mountpoints.reverse_each do |mnt| next unless parts[mnt[:device]] parts[mnt[:device]].merge!(mount: mnt[:path]) end parts.empty? ? nil : parts end