2 confine :kernel => :linux
4 if FileTest.exist?("/bin/ip")
5 %x{ip addr list}.each do |line|
6 next unless line =~ /\s+inet/
7 next if line =~ /scope (link|host)/
8 if line =~ /\s+inet\s+(\S+)\/\d{1,2} .*/
22 Facter.add("v6ips") do
23 confine :kernel => :linux
25 if FileTest.exist?("/bin/ip")
26 %x{ip addr list}.each do |line|
27 next unless line =~ /\s+inet/
28 next if line =~ /scope (link|host)/
29 if line =~ /\s+inet6\s+(\S+)\/\d{1,3} .*/