Skip to content

Commit

Permalink
import custom fact for the sudo version
Browse files Browse the repository at this point in the history
currently only supports rhel. this is used to warn about sudo version <
1.7.2p1 on rhel.
  • Loading branch information
tosmi committed Apr 26, 2014
1 parent 18557bd commit e9b175f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/facter/sudoversion.rb
@@ -0,0 +1,8 @@
require 'puppet'
Facter.add("sudoversion") do
setcode do
if Facter::Util::Resolution.which('rpm')
sudoversion = Facter::Util::Resolution.exec('rpm -q sudo --nosignature --nodigest --qf \'%{VERSION}\'')
end
end
end

0 comments on commit e9b175f

Please sign in to comment.