Skip to main content
Gå til innhold

Puppet module types

The bulk of the work done by Puppet is done by various modules. Puppet modules could be developed in house or be sourced from other source e.g puppetforge. In our setup we have three different categories of modules:

  1. Role modules
  2. Profile modules
  3. Component modules

Role modules

A role module describes what a node should do. In our setup each node is mapped to one, and only one role module. This is done through the role key in hiera. Role modules should be kept very simple and should ideally just be a list of included profile modules. Role modules are allowed to inherit each other. Fig 1: Role hierarchy Fig 1: The hierarchy of role modules. Bottom layer is not extensive and included as illustration only

Profile modules

A profile module installs and configures an application or a subsystem. It should look up the relevant parameters from hiera and install/configure all packages and config files and logic needed for that application/subsystem. Profile modules should where possible use reusable component modules to install and setup the specific packages needed.

Component modules

A component module installs a single software component, and handles its configuration. These modules should be kept clean and reusable. They should take all input as parameters to their classes and not assume hiera is used. They should be kept clean of business/application logic.