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