Skip to main content

NodeSetWithoutLevel

The department is: NodeSetWithoutLevel

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

Enabled by default Supports autocorrection Target Chef Version
Enabled No All Versions

When setting a node attribute in Chef Infra Client 11 and later you must specify the precedence level.

Examples

incorrect

node['foo']['bar'] = 1
node['foo']['bar'] << 1
node['foo']['bar'] += 1
node['foo']['bar'] -= 1

correct

node.default['foo']['bar'] = 1
node.default['foo']['bar'] << 1
node.default['foo']['bar'] += 1
node.default['foo']['bar'] -= 1

Configurable attributes

Name Default value Configurable values
Version Added 5.13.0 String
Include
Array

Was this page helpful?

×









Search Results