A puppet-lint plugin to check the ensure attribute on package resources.
$ gem install puppet-lint-package_ensure-checkgem 'puppet-lint-package_ensure-check'The latest value for the ensure attribute is dangerous and should not be used. You should use installed or a version specifier instead.
package { 'puppet':
ensure => latest,
}package { 'puppet':
ensure => '3.8.3-1',
}To disable this check, you can add --no-package_ensure-check to your puppet-lint command line.
$ puppet-lint --no-package_ensure-check path/to/file.ppAlternatively, if you’re calling puppet-lint via the Rake task, you should insert the following line to your Rakefile.
PuppetLint.configuration.send('disable_package_ensure')This plugin has the ability to fix the ensure value by setting it to installed instead of latest.
Only use this if you know what you're doing!