ExecuteScExe
The department is: Chef/Modernize
The full name of the cop is: Chef/Modernize/ExecuteScExe
Enabled by default | Supports autocorrection | Target Chef Version |
---|---|---|
Enabled | No | 14.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
Name | Default value | Configurable values |
---|---|---|
Version Added | 5.16.0 | String | Exclude |
|
Array |
Was this page helpful?