Chef/Modernize/UseMultipackageInstalls
The Cookstyle cops department: Chef/Modernize
| 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 |