prevent deprecation warning about the allow_virtual parameter
This commit is contained in:
parent
e1a9bf5063
commit
d73fd3c5ef
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