Skip to main content

SearchForEnvironmentsOrRoles

The department is: SearchForEnvironmentsOrRoles

The full name of the cop is: Chef/Effortless/SearchForEnvironmentsOrRoles

Enabled by defaultSupports autocorrectionTarget Chef Version
Not EnabledNoAll Versions

Policyfiles (and Effortless) do not use environments or roles so searching for those will need to be refactored before migrating to Policyfiles and the Effortless pattern.

Examples

incorrect

search(:node, 'chef_environment:foo')
search(:node, 'role:bar')

Configurable attributes

NameDefault valueConfigurable values
Version Added5.11.0String
Include
    Array

    Thank you for your feedback!

    ×









    Search Results