Nested Classes Or Defines

Classes and defined resource types must not be defined within other classes (style guide).

What you have done

class apache {
  class ssl { }

# or

class apache {
  define config() { }

What you should have done:

Split these classes and/or defines out into seperate files as described in the module fundamentals documentation.

Disabling the check

To disable this check you can add --no-nested_classes_or_defines-check to your puppet-lint command line.

$ puppet-lint --no-nested_classes_or_defines-check path/to/file.pp

Alternatively, if you’re calling puppet-lint via the Rake task, you should insert the following line to your Rakefile.