1 # Fact: package_provider
3 # Purpose: Returns the default provider Puppet will choose to manage packages
6 # Resolution: Instantiates a dummy package resource and return the provider
11 require 'puppet/type/package'
13 Facter.add(:package_provider) do
15 if defined? Gem && Gem::Version.new(Facter.value(:puppetversion).split(' ')[0]) >= Gem::Version.new('3.6')
16 Puppet::Type.type(:package).newpackage(:name => 'dummy', :allow_virtual => 'true')[:provider].to_s
18 Puppet::Type.type(:package).newpackage(:name => 'dummy')[:provider].to_s