# File lib/facter/util/ip.rb, line 60 60: def self.get_interfaces 61: return [] unless output = Facter::Util::IP.get_all_interface_output() 62: 63: # windows interface names contain spaces and are quoted and can appear multiple 64: # times as ipv4 and ipv6 65: return output.scan(/\s* connected\s*(\S.*)/).flatten.uniq if Facter.value(:kernel) == 'windows' 66: 67: # Our regex appears to be stupid, in that it leaves colons sitting 68: # at the end of interfaces. So, we have to trim those trailing 69: # characters. I tried making the regex better but supporting all 70: # platforms with a single regex is probably a bit too much. 71: output.scan(/^\S+/).collect { |i| i.sub(/:$/, '') }.uniq 72: end