Puppet “allow_virtual” parameter

We have a mix puppet environment (2.7.6/3.7.4 clients and 3.7.4 server). After upgraded the puppet master from 2.7.6 to 3.7.4, we start to see a warning about ‘allow_virtual’.

On the puppet 2.7.6, it is ‘Failed to apply catalog: Invalid parameter allow_virtual at …’

On the puppet 3.74, it is ‘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.’

To fix it, you have to treat puppet 2.7.6 and 3.7.4 differently, it is change on puppet version 3.6.0 and newer. Put the below code into the site.pp manifest.

if versioncmp($::puppetversion, ‘3.6.0’) >= 0 {
Package { allow_virtual => true, }




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s