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