Skip to main content

Chef/Deprecations/ChefHandlerRecipe

Cookstyle cops page

The Cookstyle cops department: Chef/Deprecations

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYesAll Versions

There is no need to include the empty and deprecated chef_handler::default recipe to use the chef_handler resource

Examples

# bad
include_recipe 'chef_handler'
include_recipe 'chef_handler::default'

# good
# the chef_handler resource ships in Chef Infra Client, so no recipe include is needed
chef_handler 'MyHandler' do
  source '/etc/chef/handlers/my_handler.rb'
  action :enable
end

Configurable attributes

NameDefault valueConfigurable values
Version Added6.12.0String
Include
    Array

    Thank you for your feedback!

    ×