Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'require puppet' forces puppet to load pre-maturely #163

Closed
ChrisPortman opened this issue Jan 27, 2015 · 1 comment
Closed

'require puppet' forces puppet to load pre-maturely #163

ChrisPortman opened this issue Jan 27, 2015 · 1 comment

Comments

@ChrisPortman
Copy link

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

@petems
Copy link
Member

petems commented Mar 19, 2015

This can be closed, fixed in #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants