Using standard naming conventions
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 truer if other people need to read and work on your manifests.
How to do itβ¦
Here are some tips on how to name things in your manifests:
Name modules after the software or service they manage, for example,
apache
orhaproxy
.Name classes within modules after the function or service they provide to the module, for example,
apache::vhosts
orrails::dependencies
.If a class within a module disables the service provided by that module, name it
disabled
. For example, a class which disables Apache should be namedapache::disabled
.If a node provides multiple services, have the node definition include one module or class named for each service, for example:
node 'server014' inherits 'server' { include puppet::server include mail::server include repo::gem include repo::apt include zabbix }
The module that manages users...