Sha256: 064c1a6d9ce43ccacfa154db099c5eb0d192d8931cde01cc56b4ee8ef79c050d
Contents?: true
Size: 627 Bytes
Versions: 35
Compression:
Stored size: 627 Bytes
Contents
# frozen_string_literal: true module Facts module Linux class Partitions FACT_NAME = 'partitions' def call_the_resolver Facter::ResolvedFact.new(FACT_NAME, partitions) end def partitions parts = Facter::Resolvers::Partitions.resolve(:partitions) 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 end end end
Version data entries
35 entries across 35 versions & 1 rubygems