Added IPV6 Fact Check for Linux distros
This commit is contained in:
parent
fe3e409c9c
commit
11a1bc43da
1 changed files with 14 additions and 0 deletions
14
lib/facter/ipv6.rb
Normal file
14
lib/facter/ipv6.rb
Normal 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
|
Loading…
Reference in a new issue