Current File : //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/facts/windows/macaddress_interfaces.rb |
# frozen_string_literal: true
module Facts
module Windows
class MacaddressInterfaces
FACT_NAME = 'macaddress_.*'
TYPE = :legacy
def call_the_resolver
arr = []
interfaces = Facter::Resolvers::Windows::Networking.resolve(:interfaces)
interfaces&.each do |interface_name, info|
arr << Facter::ResolvedFact.new("macaddress_#{interface_name}", info[:mac], :legacy) if info[:mac]
end
arr
end
end
end
end