Skip to main content

Chef/Effortless/SearchForEnvironmentsOrRoles

Cookstyle cops page

The Cookstyle cops department: Chef/Effortless

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