Skip to main content

InvalidPlatformInCase

The department is: InvalidPlatformInCase

The full name of the cop is: Chef/Correctness/InvalidPlatformInCase

Enabled by defaultSupports autocorrectionTarget Chef Version
EnabledYesAll Versions

Use valid platform values in case statements. See Infra Language: Platform for a list of many common platform values.

Examples

incorrect

case node['platform']
when 'rhel'
  puts "I'm on a Red Hat system!"
end

Configurable attributes

NameDefault valueConfigurable values
Version Added6.6.0String
Include
    Array

    Was this page helpful?

    ×









    Search Results