The following facts:
lib/facter/pip_version.rb
lib/facter/python_version.rb
lib/facter/virtualenv_version.rb
All do 'require puppet' which causes the puppet to load before it should. This creates issues in setting resource defaults in site.pp. For example, Puppet 3.7 currently issues this warning:
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
(at /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/type/package.rb:430:in `block (3 levels) in module:Puppet')
during puppet agent runs. The accepted way to mute this is to explicitly set the detault value for allow_virtual like this:
site.pp
if versioncmp($::puppetversion,'3.6.1') >= 0 {
Package {
allow_virtual => false,
}
}
however, due to the 'require puppet' statement in these facts, the code that generates this warning is loaded before site.pp is processed.
Please remove the 'require puppet'
Thanks,
Chris
The following facts:
lib/facter/pip_version.rb
lib/facter/python_version.rb
lib/facter/virtualenv_version.rb
All do 'require puppet' which causes the puppet to load before it should. This creates issues in setting resource defaults in site.pp. For example, Puppet 3.7 currently issues this warning:
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
(at /opt/puppet/lib/ruby/site_ruby/1.9.1/puppet/type/package.rb:430:in `block (3 levels) in module:Puppet')
during puppet agent runs. The accepted way to mute this is to explicitly set the detault value for allow_virtual like this:
site.pp
if versioncmp($::puppetversion,'3.6.1') >= 0 {
Package {
allow_virtual => false,
}
}
however, due to the 'require puppet' statement in these facts, the code that generates this warning is loaded before site.pp is processed.
Please remove the 'require puppet'
Thanks,
Chris