Class: Facts::Openbsd::IpaddressInterfaces
- Inherits:
-
Object
- Object
- Facts::Openbsd::IpaddressInterfaces
- Defined in:
- lib/facter/facts/openbsd/ipaddress_interfaces.rb
Constant Summary collapse
- FACT_NAME =
'ipaddress_.*'
- TYPE =
:legacy
Instance Method Summary collapse
Instance Method Details
#call_the_resolver ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/facter/facts/openbsd/ipaddress_interfaces.rb', line 9 def call_the_resolver arr = [] interfaces = Facter::Resolvers::Networking.resolve(:interfaces) interfaces&.each do |interface_name, info| arr << Facter::ResolvedFact.new("ipaddress_#{interface_name}", info[:ip], :legacy) if info[:ip] end arr end |