Added IPV6 Fact Check for Linux distros

This commit is contained in:
James Fryman 2011-06-06 10:02:10 -05:00
parent fe3e409c9c
commit 11a1bc43da

14
lib/facter/ipv6.rb Normal file
View file

@ -0,0 +1,14 @@
# ipv6 support
# returns a true/false to see if the kernel has ipv6 support
# installed and determine addresses
require 'facter'
Facter.add("ipv6") do
setcode do
ipv6_exists = 'unknown'
if Facter.value('kernel').value?('Linux')
ipv6_exists = File.exist?('/proc/net/if_inet6') ? true : false
end
ipv6_exists
end
end