Chef/Effortless/SearchForEnvironmentsOrRoles
The Cookstyle cops department: Chef/Effortless
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 |
Include | Array |