IncludingAptDefaultRecipe

All Cookstyle Cops


The department is: Chef/Modernize

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


Enabled by default Supports autocorrection Target Chef Version
Enabled No 12.7+

For many users the apt::default cookbook is used only to update apt’s package cache. Chef Infra Client 12.7 and later include an apt_update resource which should be used to perform this instead. Keep in mind that some users will want to stick with the apt::default recipe as it also installs packages necessary for using https repositories on Debian systems and manages some configuration files.

Examples

incorrect

include_recipe 'apt::default'
include_recipe 'apt'

correct

apt_update

Configurable attributes

Name Default value Configurable values
Version Added 5.3.0 String
Exclude
  • **/metadata.rb
Array

© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/workstation/cookstyle/chef_modernize_includingaptdefaultrecipe/