HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //proc/self/root/usr/lib/ruby/site_ruby/1.8/facter/augeasversion.rb
# Fact: augeasversion
#
# Purpose: Report the version of the Augeas library.
#
# Resolution:
#   Loads ruby-augeas and reports the value of `/augeas/version`, the version of
#   the underlying Augeas library.
#
# Caveats:
#   The library version may not indicate the presence of certain lenses,
#   depending on the system packages updated, nor the version of ruby-augeas
#   which may affect support for the Puppet Augeas provider.
#   Versions prior to 0.3.6 cannot be interrogated for their version.
#

Facter.add(:augeasversion) do
  setcode do
    begin
      require 'augeas'
      aug = Augeas::open('/', nil, Augeas::NO_MODL_AUTOLOAD)
      ver = aug.get('/augeas/version')
      aug.close
      ver
    rescue Exception
      Facter.debug('ruby-augeas not available')
    end
  end
end