Skip to content

Instantly share code, notes, and snippets.

@discreet
Created June 30, 2014 00:03
Show Gist options
  • Save discreet/eff6c4a704b5f5e6bbbd to your computer and use it in GitHub Desktop.
Save discreet/eff6c4a704b5f5e6bbbd to your computer and use it in GitHub Desktop.
NSClient++ Version
#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