Created
June 30, 2014 00:03
-
-
Save discreet/eff6c4a704b5f5e6bbbd to your computer and use it in GitHub Desktop.
NSClient++ Version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NSClient++ Version | |
Facter.add("NSClient_Version") do | |
confine :osfamily => "Windows" | |
setcode do | |
NSClient_Version = Facter::Util::Resolution.exec("command to pull version") | |
#only use the below if and while in the case of normalizing version numbers | |
#the below code is assuming symantec versioning is being used (ex. 3.5.1) | |
#if NSClient_Version.length < 5 | |
# while NSClient_Version.length < 5 do | |
# NSClient_Version.insert(-1, '.0') | |
# end | |
#end | |
NSClient_Version | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment