diff --git a/lib/facter/ipv6.rb b/lib/facter/ipv6.rb new file mode 100644 index 0000000..9202f78 --- /dev/null +++ b/lib/facter/ipv6.rb @@ -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 \ No newline at end of file