Skip to main content

Chef/Modernize/ExecuteScExe

Cookstyle cops page

The Cookstyle cops department: Chef/Modernize

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNo14.0+

Chef Infra Client 14.0 and later includes :create, :delete, and :configure actions with the full idempotency of the windows_service resource. See the windows_service documentation at https://docs.chef.io/resources/windows_service for additional details on creating services with the windows_service resource.

Examples

incorrect

execute "Delete chef-client service" do
  command "sc.exe delete chef-client"
  action :run
end

correct

windows_service 'chef-client' do
  action :delete
end

Configurable attributes

NameDefault valueConfigurable values
Version Added5.16.0String
Include
    Array

    Thank you for your feedback!

    ×










    Search Results