diff options
author | Ben H <git@mumble.org.uk> | 2011-03-13 14:07:37 +1100 |
---|---|---|
committer | Adrien Thebo <adrien.thebo@gmail.com> | 2011-04-01 18:19:11 -0700 |
commit | d31e3f9ee6b36e707a189569132bcdcea79f20f6 (patch) | |
tree | 2a1eea877715b67963b9f48de93c6fc73dab9838 /lib/facter/kernelversion.rb | |
parent | af4947c603b8f6610d861f303a7813cbc5ecf5e7 (diff) | |
download | facter-d31e3f9ee6b36e707a189569132bcdcea79f20f6.tar.gz facter-d31e3f9ee6b36e707a189569132bcdcea79f20f6.tar.xz facter-d31e3f9ee6b36e707a189569132bcdcea79f20f6.zip |
(#5394) Document each Facter fact.
Document all the builtin Facter facts in puppetdoc/rdoc format.
This is laying the ground work for using a tool like puppet doc, or puppet
describe but for facter, so you can see what a fact is for and how it
resolves this. This is the "leg work" of documenting the actual facts, and
the syntax of them may change in future.
Diffstat (limited to 'lib/facter/kernelversion.rb')
-rw-r--r-- | lib/facter/kernelversion.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/facter/kernelversion.rb b/lib/facter/kernelversion.rb index cac6c14..7e0d95c 100644 --- a/lib/facter/kernelversion.rb +++ b/lib/facter/kernelversion.rb @@ -1,3 +1,15 @@ +# Fact: kernelversion +# +# Purpose: Return the operating system's kernel version. +# +# Resolution: +# On Solaris and SunOS based machines, returns the output of "uname -v". +# Otherwise returns the 'kernerlversion' fact up to the first '-'. This may be +# the entire 'kernelversion' fact in many cases. +# +# Caveats: +# + Facter.add("kernelversion") do setcode do Facter['kernelrelease'].value.split('-')[0] |