Skip to main content

DeprecatedSudoActions

The department is: DeprecatedSudoActions

The full name of the cop is: Chef/Deprecations/DeprecatedSudoActions

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYes14.0+

The sudo resource in the sudo cookbook 5.0 (2018) or Chef Infra Client 14 and later have replaced the existing :install and :remove actions with :create and :delete actions to better match other resources in Chef Infra.

Examples

incorrect

sudo 'admins' do
  users 'bob'
  groups 'sysadmins, superusers'
  action :remove
end

correct

sudo 'admins' do
  users 'bob'
  groups 'sysadmins, superusers'
  action :delete
end

Configurable attributes

NameDefault valueConfigurable values
Version Added7.18.0String
Include
    Array

    Thank you for your feedback!

    ×









    Search Results