Sha256: 062c3bf6d434b6e698278fb0667c8f1f61954f7a79422573c692b643f3d88cbc

Contents?: true

Size: 437 Bytes

Versions: 2

Compression:

Stored size: 437 Bytes

Contents

# frozen_string_literal: true

module Facter
  module Windows
    class IpaddressInterfaces
      FACT_NAME = 'ipaddress_.*'

      def call_the_resolver
        arr = []
        interfaces = Resolvers::Networking.resolve(:interfaces)
        interfaces&.each do |interface_name, info|
          arr << ResolvedFact.new("ipaddress_#{interface_name}", info[:ip], :legacy) if info[:ip]
        end

        arr
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facter-4.0.8.pre lib/facts/windows/ipaddress_interfaces.rb
facter-4.0.7.pre lib/facts/windows/ipaddress_interfaces.rb