Sha256: f1a0d193f51198d71f4f42b0f41b888c3e6bcee64a60a4f3e23ee7471e66cce1

Contents?: true

Size: 341 Bytes

Versions: 16

Compression:

Stored size: 341 Bytes

Contents

# Fact: puppetversion
#
# Purpose: Return the version of puppet installed.
#
# Resolution:
#   Requires puppet via Ruby and returns the value of its version constant.
#
# Caveats:
#

Facter.add(:puppetversion) do
  setcode do
    begin
      require 'puppet'
      Puppet::PUPPETVERSION.to_s
    rescue LoadError
      nil
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
facter-2.4.1 lib/facter/puppetversion.rb
facter-2.4.1-x86-mingw32 lib/facter/puppetversion.rb
facter-2.4.1-x64-mingw32 lib/facter/puppetversion.rb
facter-2.4.1-universal-darwin lib/facter/puppetversion.rb
facter-2.4.0 lib/facter/puppetversion.rb
facter-2.4.0-x86-mingw32 lib/facter/puppetversion.rb
facter-2.4.0-x64-mingw32 lib/facter/puppetversion.rb
facter-2.4.0-universal-darwin lib/facter/puppetversion.rb
facter-2.3.0 lib/facter/puppetversion.rb
facter-2.3.0-x86-mingw32 lib/facter/puppetversion.rb
facter-2.3.0-x64-mingw32 lib/facter/puppetversion.rb
facter-2.3.0-universal-darwin lib/facter/puppetversion.rb
facter-2.2.0 lib/facter/puppetversion.rb
facter-2.2.0-x86-mingw32 lib/facter/puppetversion.rb
facter-2.2.0-x64-mingw32 lib/facter/puppetversion.rb
facter-2.2.0-universal-darwin lib/facter/puppetversion.rb