Using standard naming conventions

"There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors."— Phil Karlton

Choosing appropriate and informative names for your modules and classes will be a big help when it comes to maintaining your code. This is even more true if other people need to read and work on your manifests.

How to do it…

  1. Name modules after the software or service they manage: for example, apache or haproxy.

    Name classes within modules after the function or service they provide to the module: for example, apache::vhosts or rails::dependencies.

    If a class within a module disables the service provided by that module, name it as disabled. For example, a class that disables Apache should be ...

Get Puppet 2.7 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.