Merge pull request #535 from martinpfeifer/package_provider_fact
prevent deprecation warning about the allow_virtual parameter
This commit is contained in:
commit
4e62223801
1 changed files with 5 additions and 1 deletions
|
@ -12,6 +12,10 @@ require 'puppet/type/package'
|
|||
|
||||
Facter.add(:package_provider) do
|
||||
setcode do
|
||||
Puppet::Type.type(:package).newpackage(:name => 'dummy')[:provider].to_s
|
||||
if Gem::Version.new(Facter.value(:puppetversion)) >= Gem::Version.new('3.6')
|
||||
Puppet::Type.type(:package).newpackage(:name => 'dummy', :allow_virtual => 'true')[:provider].to_s
|
||||
else
|
||||
Puppet::Type.type(:package).newpackage(:name => 'dummy')[:provider].to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue