Skip to main content

UseMultipackageInstalls

The department is: UseMultipackageInstalls

The full name of the cop is: Chef/Modernize/UseMultipackageInstalls

Enabled by default Supports autocorrection Target Chef Version
Enabled Yes All Versions

Pass an array of packages to package resources instead of iterating over an array of packages when using multi-package capable package subsystem such as apt, yum, chocolatey, dnf, or zypper. Multi-package installs are faster and simplify logs.

Examples

incorrect

%w(bmon htop vim curl).each do |pkg|
  package pkg do
    action :install
  end
end

correct

package %w(bmon htop vim curl)

Configurable attributes

Name Default value Configurable values
Version Added 6.0.0 String
Include
Array

Was this page helpful?

×









Search Results