Skip to main content

NodeSetWithoutLevel

The department is: NodeSetWithoutLevel

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

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledNoAll 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

NameDefault valueConfigurable values
Version Added5.13.0String
Include
    Array

    Thank you for your feedback!

    ×









    Search Results