class RuboCop::Cop::Chef::Modernize::IncludingAptDefaultRecipe
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.
@example
#### incorrect include_recipe 'apt::default' include_recipe 'apt' #### correct apt_update
Constants
- MSG
- RESTRICT_ON_SEND
Public Instance Methods
on_send(node)
click to toggle source
# File lib/rubocop/cop/chef/modernize/apt_default_recipe.rb, line 45 def on_send(node) apt_recipe_usage?(node) do add_offense(node, severity: :refactor) end end